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:
>>[...]
>>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
a
>>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.

Agree.

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 ;-)

Christian



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