From 47bc802e9e8942182cd3cec1b5a6c3fb62427d16 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 28 May 2005 23:36:38 +0000 Subject: [PATCH] Patch from Shaun Jackman to save a few bytes. --- coreutils/watch.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/coreutils/watch.c b/coreutils/watch.c index f9f40189e..8a6a019bc 100644 --- a/coreutils/watch.c +++ b/coreutils/watch.c @@ -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"); } } }