run-command: do not warn about child death from terminal
authorJeff King <peff@peff.net>
Fri, 30 Nov 2012 22:41:38 +0000 (17:41 -0500)
committerJunio C Hamano <gitster@pobox.com>
Sun, 2 Dec 2012 10:06:43 +0000 (02:06 -0800)
SIGINT and SIGQUIT are not generally interesting signals to
the user, since they are typically caused by them hitting "^C"
or otherwise telling their terminal to send the signal.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
run-command.c

index 3aae270dd3fef24bb172a82f749c67ce59446692..757f263cd6209cf5aa2b2bbda28e1103ad0303f8 100644 (file)
@@ -242,7 +242,8 @@ static int wait_or_whine(pid_t pid, const char *argv0)
                error("waitpid is confused (%s)", argv0);
        } else if (WIFSIGNALED(status)) {
                code = WTERMSIG(status);
-               error("%s died of signal %d", argv0, code);
+               if (code != SIGINT && code != SIGQUIT)
+                       error("%s died of signal %d", argv0, code);
                /*
                 * This return value is chosen so that code & 0xff
                 * mimics the exit code that a POSIX shell would report for