Patch from Shaun Jackman to save a few bytes.
authorRob Landley <rob@landley.net>
Sat, 28 May 2005 23:36:38 +0000 (23:36 -0000)
committerRob Landley <rob@landley.net>
Sat, 28 May 2005 23:36:38 +0000 (23:36 -0000)
coreutils/watch.c

index f9f40189ec68d30f8ae1c8b6a37851bb9e512c38..8a6a019bcde24bdd49d0399829a76db335401a85 100644 (file)
@@ -100,11 +100,10 @@ extern int watch_main(int argc, char **argv)
                        //child
                        close(1);
                        dup(old_stdout);
-                       if (execvp(*watched_argv, watched_argv)) {
-                               bb_error_msg_and_die("Couldn't run command\n");
-                       }
+                       execvp(*watched_argv, watched_argv);
+                       bb_perror_msg_and_die(*watched_argv);
                } else {
-                       bb_error_msg_and_die("Couldn't vfork\n");
+                       bb_perror_msg_and_die("vfork");
                }
        }
 }