Jeff King wrote:
> On Wed, Feb 20, 2013 at 01:51:11PM -0800, Jonathan Nieder wrote:

>>> +   if (err == EPIPE) {
>>> +           signal(SIGPIPE, SIG_DFL);
>>> +           raise(SIGPIPE);
>>> +           /* Should never happen, but just in case... */
>>> +           exit(141);
>> How about
>>              die("BUG: another thread changed SIGPIPE handling behind my 
>> back!");
>> to make it easier to find and fix such problems?
> You mean for the "should never happen" bit, not the first part, right? I
> actually wonder if we should simply exit(141) in the first place. That
> is shell exit-code for SIGPIPE death already (so it's what our
> run_command would show us, and what anybody running us through shell
> would see).

Yes, for the "should never happen" part.  Raising a signal is nice
because it means the wait()-ing process can see what happened by
checking WIFSIGNALED(status).

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to