git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
	Paul Fox <pgf@foxharp.boston.ma.us>,
	Krzysztof Mazur <krzysiek@podlesie.net>
Subject: [PATCH 4/5] run-command: do not warn about child death from terminal
Date: Fri, 30 Nov 2012 17:41:38 -0500	[thread overview]
Message-ID: <20121130224138.GD23772@sigill.intra.peff.net> (raw)
In-Reply-To: <20121130223943.GA27120@sigill.intra.peff.net>

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>
---
 run-command.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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
-- 
1.8.0.1.620.g558b0aa

  parent reply	other threads:[~2012-11-30 22:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30 22:39 [PATCH 0/5] ignore SIG{INT,QUIT} when launching editor Jeff King
2012-11-30 22:40 ` [PATCH 1/5] run-command: drop silent_exec_failure arg from wait_or_whine Jeff King
2012-11-30 22:41 ` [PATCH 2/5] launch_editor: refactor to use start/finish_command Jeff King
2012-11-30 22:41 ` [PATCH 3/5] launch_editor: ignore terminal signals while editor has control Jeff King
2012-11-30 22:41 ` Jeff King [this message]
2012-11-30 22:41 ` [PATCH 5/5] launch_editor: propagate signals from editor to git Jeff King
2012-12-01 12:34 ` [PATCH 0/5] ignore SIG{INT,QUIT} when launching editor Krzysztof Mazur
2012-12-01 15:48 ` Paul Fox
2012-12-02 10:04 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121130224138.GD23772@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=krzysiek@podlesie.net \
    --cc=pgf@foxharp.boston.ma.us \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).