aboutsummaryrefslogtreecommitdiff
path: root/lib/xwrap.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-09-18 14:09:34 -0500
committerRob Landley <rob@landley.net>2019-09-18 14:09:34 -0500
commit03b79265b572ca98ff2d07ad68e130dd8f64636f (patch)
treeb3fb63547d118fc5e9456670559b7bc435097b30 /lib/xwrap.c
parent66aebaaeeefde97a33d8b35ea2d20dd3c1eebb47 (diff)
downloadtoybox-03b79265b572ca98ff2d07ad68e130dd8f64636f.tar.gz
Get exit code right when command intercepts signal, make timeout use
xwaitpid(), fix off by one in xwaitpid().
Diffstat (limited to 'lib/xwrap.c')
-rw-r--r--lib/xwrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xwrap.c b/lib/xwrap.c
index 317b149f..1a3ef837 100644
--- a/lib/xwrap.c
+++ b/lib/xwrap.c
@@ -316,7 +316,7 @@ int xwaitpid(pid_t pid)
while (-1 == waitpid(pid, &status, 0) && errno == EINTR);
- return WIFEXITED(status) ? WEXITSTATUS(status) : WTERMSIG(status)+127;
+ return WIFEXITED(status) ? WEXITSTATUS(status) : WTERMSIG(status)+128;
}
int xpclose_both(pid_t pid, int *pipes)