Skip to content

Commit a2767c5

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 913ef36 commit a2767c5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

run-command.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ static int wait_or_whine(pid_t pid, const char *argv0)
242242
error("waitpid is confused (%s)", argv0);
243243
} else if (WIFSIGNALED(status)) {
244244
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);
246247
/*
247248
* This return value is chosen so that code & 0xff
248249
* mimics the exit code that a POSIX shell would report for

0 commit comments

Comments
 (0)