diff options
Diffstat (limited to 'run-command.c')
-rw-r--r-- | run-command.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/run-command.c b/run-command.c index 00e68f37ab..509841bf27 100644 --- a/run-command.c +++ b/run-command.c @@ -552,7 +552,9 @@ static int wait_or_whine(pid_t pid, const char *argv0, int in_signal) while ((waiting = waitpid(pid, &status, 0)) < 0 && errno == EINTR) ; /* nothing */ if (in_signal) { - return 0; + if (WIFEXITED(status)) + code = WEXITSTATUS(status); + return code; } if (waiting < 0) { |