From: Marat Radchenko Date: Fri, 28 Mar 2014 09:14:07 GMT Subject: Re: [BUG] MSVC: error box when interrupting `gitlog` by quitting less Message-ID: In-Reply-To: Marat Radchenko slonopotamus.org> writes: > > Jeff King 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 [1] 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? [1]: http://msdn.microsoft.com/en-us/library/dwwzkt4c.aspx