Re: [BUG] MSVC: error box when interrupting `gitlog` by quitting less
- From
Marat Radchenko <marat@slonopotamus.org>
- Date
- Mar 28, 2014, 09:14 UTC
- Message-ID
- <loom.20140328T101113-154@post.gmane.org>
- In-Reply-To
- <loom.20140328T093203-852@post.gmane.org>
Marat Radchenko <marat <at> slonopotamus.org> writes:
Show 10 quoted lines
> > 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 [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