chiark
/
gitweb
/
~mdw
/
misc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
25ae65a
)
timeout.c: Fix exit codes; useful message on exec failure.
author
Mark Wooding
<mdw@distorted.org.uk>
Tue, 7 Jun 2011 09:07:10 +0000
(10:07 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Tue, 7 Jun 2011 09:08:44 +0000
(10:08 +0100)
timeout.c
patch
|
blob
|
blame
|
history
diff --git
a/timeout.c
b/timeout.c
index 0493efafd1be7f2f41075177b273d987dd40e8bc..dbdc83ef60584bd0e03f3c2b67a115fb2d631a76 100644
(file)
--- 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++;
while (isspace((unsigned char)*p)) p++;
t = strtod(argv[0], &p);
while (isspace((unsigned char)*p)) p++;
- if (*p) die(25
4
, "bad time value `%s'", argv[0]);
+ if (*p) die(25
3
, "bad time value `%s'", argv[0]);
/* --- Get things set up --- */
/* --- 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);
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;
}
sc.kid = kid;