Print this page
11238 librtld_db demos should work with gcc 7

@@ -167,11 +167,11 @@
         /*
          * create a child to fork and exec from.
          */
         if ((cpid = fork()) == 0) {
                 (void) execv(argv[optind], &argv[optind]);
-                perr(argv[1]);
+                perr(argv[optind]);
         }
 
         if (cpid == -1) /* fork() failure */
                 perr(command);