run-command: do not warn about child death from terminal
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>
Jeff King committed
Nov 30, 2012 at 17:41 UTC
a2767c5c91ebda3c083419c80a7f64248c5ec175
1 file changed
+2
-1
run-command.c
+2
-1
@@ -242,7 +242,8 @@ static int wait_or_whine(pid_t pid, const char *argv0)
242
error("waitpid is confused (%s)", argv0);
243
} else if (WIFSIGNALED(status)) {
244
code = WTERMSIG(status);
245
- error("%s died of signal %d", argv0, code);
245
+ if (code != SIGINT && code != SIGQUIT)
246
+ error("%s died of signal %d", argv0, code);
247
/*
248
* This return value is chosen so that code & 0xff
249
* mimics the exit code that a POSIX shell would report for