Am 24.06.2016 um 23:05 schrieb Jeff King:
On Fri, Jun 24, 2016 at 10:52:32PM +0200, Johannes Sixt wrote:
The Windows behavior is most closely described as having signal(SIGPIPE,
SIG_IGN) at the very beginning of the program.

Right, but then we would get EPIPE. So what does git do in such cases?
I'd expect it generally to either hit the check_pipe() part of
write_or_die(), or to end up complaining via die() that the write didn't
go as expected.

Ah, I have forgotten about this code path. Looks like it will trigger exactly the same raise() as test_sigchain. Then the check for exit code 3 makes a bit more sense. But I'm sure we have code paths that do not go through checK_pipe(). Those would proceed through whatever error handling we have and most likely die().

IMO there is too much danger to trigger a false positive if exit code 3 is
treated special in this generality.

Yeah, I agree. But what _should_ it do? E.g., what happens to git-daemon
when it is killed via TERM?

Frankly, I don't know how bash's 'kill -TERM' and a Windows program interact. I've avoided this topic like the plague so far.

-- Hannes

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to