From: Mark Wooding Date: Tue, 7 Jun 2011 09:07:10 +0000 (+0100) Subject: timeout.c: Fix exit codes; useful message on exec failure. X-Git-Tag: 1.2.6~10^2 X-Git-Url: https://git.distorted.org.uk/~mdw/misc/commitdiff_plain/3ece3fc9e58c63542cf71a59baf1611efc3753b1 timeout.c: Fix exit codes; useful message on exec failure. --- diff --git a/timeout.c b/timeout.c index 0493efa..dbdc83e 100644 --- a/timeout.c +++ b/timeout.c @@ -412,7 +412,7 @@ int main(int argc, char *const argv[]) while (isspace((unsigned char)*p)) p++; t = strtod(argv[0], &p); while (isspace((unsigned char)*p)) p++; - if (*p) die(254, "bad time value `%s'", argv[0]); + if (*p) die(253, "bad time value `%s'", argv[0]); /* --- Get things set up --- */ @@ -439,7 +439,7 @@ int main(int argc, char *const argv[]) if (!kid) { setpgid(0, 0); execvp(argv[1], argv + 1); - _exit(252); + die(252, "exec(%s) failed: %s", argv[1], strerror(errno)); } sc.kid = kid;