summaryrefslogtreecommitdiff
path: root/run-command.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-11-30 22:41:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-12-02 10:06:43 (GMT)
commita2767c5c91ebda3c083419c80a7f64248c5ec175 (patch)
tree65f09db0346c17c025b9cc1049aced82675a01b3 /run-command.c
parent913ef36093eac3ec78b5fb155cc2beb5843b1ce5 (diff)
downloadgit-a2767c5c91ebda3c083419c80a7f64248c5ec175.zip
git-a2767c5c91ebda3c083419c80a7f64248c5ec175.tar.gz
git-a2767c5c91ebda3c083419c80a7f64248c5ec175.tar.bz2
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>
Diffstat (limited to 'run-command.c')
-rw-r--r--run-command.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/run-command.c b/run-command.c
index 3aae270..757f263 100644
--- a/run-command.c
+++ b/run-command.c
@@ -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