From 3ece3fc9e58c63542cf71a59baf1611efc3753b1 Mon Sep 17 00:00:00 2001 Message-Id: <3ece3fc9e58c63542cf71a59baf1611efc3753b1.1715637537.git.mdw@distorted.org.uk> From: Mark Wooding Date: Tue, 7 Jun 2011 10:07:10 +0100 Subject: [PATCH] timeout.c: Fix exit codes; useful message on exec failure. Organization: Straylight/Edgeware From: Mark Wooding --- timeout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- [mdw]