nonblocking-pipe tests: Fix a NULL program name in a diagnostic.
[gnulib.git] / tests / test-nonblocking-pipe-main.c
index c5c15cf..9662935 100644 (file)
@@ -32,6 +32,7 @@
 
 #include "nonblocking.h"
 #include "wait-process.h"
+#include "progname.h"
 
 #include "macros.h"
 #include "test-nonblocking-pipe.h"
 int
 main (int argc, char *argv[])
 {
-  const char *child_path = argv[1];
-  int test = atoi (argv[2]);
+  const char *child_path;
+  int test;
   int fd[2];
   int child;
   int exitcode;
 
+  set_program_name (argv[0]);
+
+  child_path = argv[1];
+  test = atoi (argv[2]);
+
   /* Create a pipe.  */
   ASSERT (pipe (fd) >= 0);