public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* cygwin 3.1 pseudo console in PTY and break/ctrl-c handling
       [not found] <937489593.4978154.1582060605719.ref@mail.yahoo.com>
@ 2020-02-18 21:18 ` Kevin Schnitzius via cygwin
  2020-02-18 21:30   ` Jose Isaias Cabrera
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Kevin Schnitzius via cygwin @ 2020-02-18 21:18 UTC (permalink / raw)
  To: cygwin

With Cygwin version 3.0.7-1, crtl-c kills native apps that are started from the shell,  For example, starting notepad in the foreground from bash would be kill by a ctrl-c.

With Cygwin version 3.1.2-1, crtl-c DOES NOT kill native apps that are started from the shell, 

Can I restore this behavior?

With 3.1.2-1:

mintty -o "CA+F12:break"                              =====>    ctrl-alt-F12 causes a break and kills notepad
mintty -o "c:break"                                          =====>    ctrl-shift-c causes a break and kills notepad
mintty -o "C+c:break"                                     =====>  FAIL -- ctrl-c kills native apps but notepad is not affected
mintty -o "CA+c:break"                                   =====>  FAIL -- ctrl-alt-c kills native apps but notepad is not affected

These tests show that the 'break' signal can be propagated from mintty but is not for the ctrl-c case.  

I am guessing that this behavior is from the pty handing but I have not dug into this code or installed winpty.

Is all this documented somewhere that I could not find?  

Kevin

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cygwin 3.1 pseudo console in PTY and break/ctrl-c handling
  2020-02-18 21:18 ` cygwin 3.1 pseudo console in PTY and break/ctrl-c handling Kevin Schnitzius via cygwin
@ 2020-02-18 21:30   ` Jose Isaias Cabrera
  2020-02-18 22:54   ` Thomas Wolff
  2020-02-20  0:32   ` Takashi Yano
  2 siblings, 0 replies; 7+ messages in thread
From: Jose Isaias Cabrera @ 2020-02-18 21:30 UTC (permalink / raw)
  To: cygwin, Kevin Schnitzius


Kevin Schnitzius via cygwin, on Tuesday, February 18, 2020 04:16 PM,
> wrote...
>
> With Cygwin version 3.0.7-1, crtl-c kills native apps that are started
> from the shell, For example, starting notepad in the foreground from bash
> would be kill by a ctrl-c.
>
> With Cygwin version 3.1.2-1, crtl-c DOES NOT kill native apps that are
> started from the shell,
>
> Can I restore this behavior?

It's working fine for me,

$ uname -a
CYGWIN_NT-10.0-WOW HORSE8E 3.1.2(0.340/5/3) 2019-12-21 15:21 i686 Cygwin

But I am using a 32bit system. Or maybe, I am not properly following the steps you are doing.

> With 3.1.2-1:
>
> mintty -o "CA+F12:break" =====> ctrl-alt-F12 causes a break and kills
> notepad
> mintty -o "c:break" =====> ctrl-shift-c causes a break and kills notepad
> mintty -o "C+c:break" =====> FAIL -- ctrl-c kills native apps but notepad
> is not affected
> mintty -o "CA+c:break" =====> FAIL -- ctrl-alt-c kills native apps but
> notepad is not affected
>
> These tests show that the 'break' signal can be propagated from mintty
> but is not for the ctrl-c case.
>
> I am guessing that this behavior is from the pty handing but I have not
> dug into this code or installed winpty.
>
> Is all this documented somewhere that I could not find?
>
> Kevin

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cygwin 3.1 pseudo console in PTY and break/ctrl-c handling
  2020-02-18 21:18 ` cygwin 3.1 pseudo console in PTY and break/ctrl-c handling Kevin Schnitzius via cygwin
  2020-02-18 21:30   ` Jose Isaias Cabrera
@ 2020-02-18 22:54   ` Thomas Wolff
  2020-02-19 20:02     ` Kevin Schnitzius via cygwin
  2020-02-20  0:32   ` Takashi Yano
  2 siblings, 1 reply; 7+ messages in thread
From: Thomas Wolff @ 2020-02-18 22:54 UTC (permalink / raw)
  To: cygwin

Am 18.02.2020 um 22:16 schrieb Kevin Schnitzius via cygwin:
> With Cygwin version 3.0.7-1, crtl-c kills native apps that are started from the shell,  For example, starting notepad in the foreground from bash would be kill by a ctrl-c.
>
> With Cygwin version 3.1.2-1, crtl-c DOES NOT kill native apps that are started from the shell,
>
> Can I restore this behavior?
>
> With 3.1.2-1:
>
> mintty -o "CA+F12:break"               =====>    ctrl-alt-F12 causes a break and kills notepad
> mintty -o "c:break"                    =====>    ctrl-shift-c causes a break and kills notepad
> mintty -o "C+c:break"                  =====>  FAIL -- ctrl-c kills native apps but notepad is not affected
> mintty -o "CA+c:break"                 =====>  FAIL -- ctrl-alt-c kills native apps but notepad is not affected
This would be mintty -o KeyFunctions='CA+F12:break' etc.
The latter two are not valid mintty configuration; Ctrl is only 
supported as a modifier for function keys and special keys, not letters. 
This is unchanged with the cygwin version.

> These tests show that the 'break' signal can be propagated from mintty but is not for the ctrl-c case.
>
> I am guessing that this behavior is from the pty handing but I have not dug into this code or installed winpty.
>
> Is all this documented somewhere that I could not find?
>
> Kevin
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cygwin 3.1 pseudo console in PTY and break/ctrl-c handling
  2020-02-18 22:54   ` Thomas Wolff
@ 2020-02-19 20:02     ` Kevin Schnitzius via cygwin
  2020-02-19 20:21       ` Brian Inglis
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin Schnitzius via cygwin @ 2020-02-19 20:02 UTC (permalink / raw)
  To: cygwin, Thomas Wolff

On Tuesday, February 18, 2020, 05:54:23 PM EST, Thomas Wolff <towo@towo.net> wrote: 

>> With 3.1.2-1:
>>
>> mintty -o "CA+F12:break"               =====>    ctrl-alt-F12 causes a break and kills notepad
>> mintty -o "c:break"                    =====>    ctrl-shift-c causes a break and kills notepad
>> mintty -o "C+c:break"                  =====>  FAIL -- ctrl-c kills native apps but notepad is not affected
>> mintty -o "CA+c:break"                 =====>  FAIL -- ctrl-alt-c kills native apps but notepad is not affected
>
> This would be mintty -o KeyFunctions='CA+F12:break' etc.
> The latter two are not valid mintty configuration; Ctrl is only 
> supported as a modifier for function keys and special keys, not letters. 
> This is unchanged with the cygwin version.

Ah, thank you.  That was the clue that I needed.

For those also having this problem:

mintty.exe -o "KeyFunctions=c:break" -o CtrlExchangeShift=true -

will propagate Ctrl-C to the non-native apps and kill them, imitating the behavior of 3.0.X Cygwin.

Now that I have played with this for a while, I am thinking that I like the new behavior better and I have assigned a new key to specifically kill native Windows programs instead letting the Ctrl-C do all the work (I am using Alt-F5 to do this).

Kevin


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cygwin 3.1 pseudo console in PTY and break/ctrl-c handling
  2020-02-19 20:02     ` Kevin Schnitzius via cygwin
@ 2020-02-19 20:21       ` Brian Inglis
  2020-02-20  9:11         ` Thomas Wolff
  0 siblings, 1 reply; 7+ messages in thread
From: Brian Inglis @ 2020-02-19 20:21 UTC (permalink / raw)
  To: cygwin

On 2020-02-19 13:02, Kevin Schnitzius via cygwin wrote:
> On Tuesday, February 18, 2020, 05:54:23 PM EST, Thomas Wolff wrote: 
>>> With 3.1.2-1:
>>> mintty -o "CA+F12:break"               =====>    ctrl-alt-F12 causes a break and kills notepad
>>> mintty -o "c:break"                    =====>    ctrl-shift-c causes a break and kills notepad
>>> mintty -o "C+c:break"                  =====>  FAIL -- ctrl-c kills native apps but notepad is not affected
>>> mintty -o "CA+c:break"                 =====>  FAIL -- ctrl-alt-c kills native apps but notepad is not affected
>>
>> This would be mintty -o KeyFunctions='CA+F12:break' etc.
>> The latter two are not valid mintty configuration; Ctrl is only 
>> supported as a modifier for function keys and special keys, not letters. 
>> This is unchanged with the cygwin version.
> 
> Ah, thank you.  That was the clue that I needed.
> 
> For those also having this problem:
> 
> mintty.exe -o "KeyFunctions=c:break" -o CtrlExchangeShift=true -
> 
> will propagate Ctrl-C to the non-native apps and kill them, imitating the behavior of 3.0.X Cygwin.
> 
> Now that I have played with this for a while, I am thinking that I like the new behavior better and I have assigned a new key to specifically kill native Windows programs instead letting the Ctrl-C do all the work (I am using Alt-F5 to do this).

Should the above settings not be the default behaviour for backward
compatibility and least surprise to users?

It used to be mintty just worked as expected with most programs, now additional
interfaces seem to be required depending on Windows versions, editions, and
releases. These helpers should either be included in the package, or be
dependencies pulled in by mintty without which it will not install, with the
appropriate interfaces installed and configured so that mintty, shells, and
programs run under it continue to work as expected.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cygwin 3.1 pseudo console in PTY and break/ctrl-c handling
  2020-02-18 21:18 ` cygwin 3.1 pseudo console in PTY and break/ctrl-c handling Kevin Schnitzius via cygwin
  2020-02-18 21:30   ` Jose Isaias Cabrera
  2020-02-18 22:54   ` Thomas Wolff
@ 2020-02-20  0:32   ` Takashi Yano
  2 siblings, 0 replies; 7+ messages in thread
From: Takashi Yano @ 2020-02-20  0:32 UTC (permalink / raw)
  To: cygwin; +Cc: Kevin Schnitzius

On Tue, 18 Feb 2020 21:16:45 +0000 (UTC)
"Kevin Schnitzius via cygwin" wrote:
> With Cygwin version 3.1.2-1, crtl-c DOES NOT kill native apps that are started from the shell, 

I am investigating why this happens.
Please wait a while.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cygwin 3.1 pseudo console in PTY and break/ctrl-c handling
  2020-02-19 20:21       ` Brian Inglis
@ 2020-02-20  9:11         ` Thomas Wolff
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Wolff @ 2020-02-20  9:11 UTC (permalink / raw)
  To: cygwin

On 19.02.2020 21:21, Brian Inglis wrote:
> On 2020-02-19 13:02, Kevin Schnitzius via cygwin wrote:
>> On Tuesday, February 18, 2020, 05:54:23 PM EST, Thomas Wolff wrote:
>>>> With 3.1.2-1:
>>>> mintty -o "CA+F12:break"               =====>    ctrl-alt-F12 causes a break and kills notepad
>>>> mintty -o "c:break"                    =====>    ctrl-shift-c causes a break and kills notepad
>>>> mintty -o "C+c:break"                  =====>  FAIL -- ctrl-c kills native apps but notepad is not affected
>>>> mintty -o "CA+c:break"                 =====>  FAIL -- ctrl-alt-c kills native apps but notepad is not affected
>>> This would be mintty -o KeyFunctions='CA+F12:break' etc.
>>> The latter two are not valid mintty configuration; Ctrl is only
>>> supported as a modifier for function keys and special keys, not letters.
>>> This is unchanged with the cygwin version.
>> Ah, thank you.  That was the clue that I needed.
>>
>> For those also having this problem:
>>
>> mintty.exe -o "KeyFunctions=c:break" -o CtrlExchangeShift=true -
>>
>> will propagate Ctrl-C to the non-native apps and kill them, imitating the behavior of 3.0.X Cygwin.
>>
>> Now that I have played with this for a while, I am thinking that I like the new behavior better and I have assigned a new key to specifically kill native Windows programs instead letting the Ctrl-C do all the work (I am using Alt-F5 to do this).
> Should the above settings not be the default behaviour for backward
> compatibility and least surprise to users?
I was just taking up the requester's example. Sure ^C is an interrupt 
function on the command line. This is handled by the pty driver, not by 
the terminal.
The above configuration is a mintty feature of assigning functions (of 
which break is just one special case) to key combinations, independent 
of the stty settings.


> It used to be mintty just worked as expected with most programs, now additional
> interfaces seem to be required depending on Windows versions, editions, and
> releases. These helpers should either be included in the package, or be
> dependencies pulled in by mintty without which it will not install, with the
> appropriate interfaces installed and configured so that mintty, shells, and
> programs run under it continue to work as expected.
Some recently reported observations are related to the ConPTY project. 
There have been no changes in mintty concerning keyboard handling.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-02-20  9:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <937489593.4978154.1582060605719.ref@mail.yahoo.com>
2020-02-18 21:18 ` cygwin 3.1 pseudo console in PTY and break/ctrl-c handling Kevin Schnitzius via cygwin
2020-02-18 21:30   ` Jose Isaias Cabrera
2020-02-18 22:54   ` Thomas Wolff
2020-02-19 20:02     ` Kevin Schnitzius via cygwin
2020-02-19 20:21       ` Brian Inglis
2020-02-20  9:11         ` Thomas Wolff
2020-02-20  0:32   ` Takashi Yano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).