Skip to content

Commit

Permalink
run-command: do not warn about child death from terminal
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Dec 2, 2012
1 parent 913ef36 commit a2767c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion run-command.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a2767c5

Please sign in to comment.