From 03b79265b572ca98ff2d07ad68e130dd8f64636f Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 18 Sep 2019 14:09:34 -0500 Subject: Get exit code right when command intercepts signal, make timeout use xwaitpid(), fix off by one in xwaitpid(). --- lib/xwrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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) -- cgit v1.2.3