From: Johannes Sixt Date: Fri, 24 Jun 2016 21:32:43 GMT Subject: Re: [PATCH 1/4] tests: factor portable signal check out of t0005 Message-ID: <576DA6FB.1050108@kdbg.org> In-Reply-To: <20160624210541.GC6282@sigill.intra.peff.net> 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