Allow to send SIGQUIT via Ctrl+BREAK (patch included)
Christian Franke
Christian.Franke@t-online.de
Fri Nov 25 20:34:00 GMT 2005
Christopher Faylor wrote:
>On Fri, Nov 25, 2005 at 08:43:43PM +0100, Christian Franke wrote:
>
>
>>OK, let's forget the patch ;-)
>>
>>
>
>Actually, I have done some more testing myself and Windows doesn't work
>the way that I remembered. It seems like CTRL-BREAK isn't handled by
>signal(SIGINT, ...). So, I was wrong about this.
>
MSVCRT maps CTRL-C to SIGINT, CTRL-BREAK to an extra SIGBREAK.
So it is possible to map this to SIGQUIT with a simple hack:
#ifdef SIGBREAK
#undef SIGQUIT
#define SIGQUIT SIGBREAK
#endif
This isn't possible with Cygwin (in notty mode), because CTRL-C and
CTRL-BREAK cannot be distinguished.
>I really should have
>tested how it worked before rejecting your patch out of hand.
>
>
N.P. ;-)
>So, this code is probably just reflecting my misperceptions of what
>Windows was doing. I'll add your patch as it improves Cygwin's
>functionality.
>
>
Thanks!
Christian
More information about the Cygwin-patches
mailing list