]> git.ipfire.org Git - thirdparty/git.git/blobdiff - run-command.c
The tenth batch
[thirdparty/git.git] / run-command.c
index ea4d0fb4b154c89a0fcd12d29e41ffcbb2af0302..509841bf273d821df41c0f0aef86d5768dda9e0b 100644 (file)
@@ -551,8 +551,11 @@ 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 (in_signal) {
+               if (WIFEXITED(status))
+                       code = WEXITSTATUS(status);
+               return code;
+       }
 
        if (waiting < 0) {
                failed_errno = errno;