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

Christian Franke
Fri Nov 25 07:50:00 GMT 2005

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.
The Cygwin-specific workaround ("press ^C twice to quit") added to
smartd.c has more lines than this cygwin1.dll patch ;-)


More information about the Cygwin-patches mailing list