about summary refs log tree commit diff
path: root/stdio-common/bug5.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/bug5.c')
-rw-r--r--stdio-common/bug5.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/stdio-common/bug5.c b/stdio-common/bug5.c
index 18f069ae29..def73397de 100644
--- a/stdio-common/bug5.c
+++ b/stdio-common/bug5.c
@@ -17,7 +17,8 @@ DEFUN_VOID(main)
   FILE *out;
   static char inname[] = "/tmp/bug5.in";
   static char outname[] = "/tmp/bug5.out";
-  int i;
+  char *printbuf;
+  int i, result;
 
   /* Create a test file.  */
   in = fopen (inname, "w+");
@@ -54,7 +55,11 @@ DEFUN_VOID(main)
 
   puts ("There should be no further output from this test.");
   fflush (stdout);
-  execlp ("cmp", "cmp", inname, outname, (char *) NULL);
-  perror ("execlp: cmp");
-  exit (1);
+
+  asprintf (&printbuf, "cmp %s %s", inname, outname);
+  result = system (printbuf);
+  remove (inname);
+  remove (outname);
+
+  exit ((result != 0));
 }