This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Allow to send SIGQUIT via Ctrl+BREAK (patch included)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]