On Fri, Mar 28, 2014 at 09:14:07AM +0000, Marat Radchenko wrote:
> > Jeff King <peff <at> peff.net> writes:
> > >
> > > The write_or_die function will always die on an error,
> > > including EPIPE. However, it currently treats EPIPE
> > > specially by suppressing any error message, and by exiting
> > > with exit code 0.
> > This causes error box on Windows in MSVC=1 build:
> After deeper investigation it turned out that Windows supports
> much less signals  than POSIX and "If the argument is not a valid signal
> as specified above, the invalid parameter handler is invoked".
> The question is - what is the proper way to fix this?
> Patch mingw_raise in compat/mingw.c to map unsupported signals into
> supported ones like SIGPIPE -> SIGTERM?
> : http://msdn.microsoft.com/en-us/library/dwwzkt4c.aspx
I'm not sure what an actual SIGPIPE death looks like on Windows. What
happens if git is still writing data to the pager and the pager exits?
Does it receive a signal of some sort?
The point of the code in check_pipe is to simulate that death. So
whatever happens to git in that case is what we would want to happen
when we call raise(SIGPIPE).
A possibly simpler option would be to just have the MSVC build skip the
raise() call, and do the exit(141) that comes just after. That is
probably close enough simulation of SIGPIPE death.
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