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

Christopher Faylor
Fri Nov 25 16:41:00 GMT 2005

On Fri, Nov 25, 2005 at 08:50:26AM +0100, Christian Franke wrote:
>Christopher Faylor wrote:
>>>Suggest to add some option to send SIGQUIT via ^BREAK.
>>>A simple patch is attached.
>>>It sends SIGQUIT on ^BREAK if both VINTR and VQUIT are set to ^C.  As
>>>positive side effect, this disables any other SIGQUIT key in termios.
>>Sorry but the precedent of sending SIGINT when pressing CTRL-BREAK is
>>long-standing behavior that I am not comfortable changing.
>But the patch won't change this long standing-behavior unless the user
>opts-in via "stty quit ^C" (see testcase).
>So the patch shouldn't BREAK anything ;-)
>As an alternative, a new CYGWIN environment setting could be used.
>But using some termios setting for such an option is IMO the right thing
>to do.
>I missed the SIGQUIT via keyboard during the first port of smartd to
>Cygwin last year. In smartd's debug mode, SIGINT is used to reload
>configuration file, SIGQUIT to exit. This worked on every supported
>platform except Cygwin.

It is (or should be, since I haven't checked it recently) supported if you
set CYGWIN=tty, though.  There is a lot of functionality that isn't available
with the normal windows console that is available with CYGWIN=tty.  Since
the only precedent for the behavior of CTRL-BREAK is MSVCRT, I am very
reluctant to change it.


More information about the Cygwin-patches mailing list