Ctrl+C is sometimes ignored on Windows Terminal

Russell VT russellvt@gmail.com
Mon Nov 1 08:50:07 GMT 2021


If you're running things from under Windows Terminal, rather than the
Cygwin terminal, the behavior is likely going to be inconsistent or
unpredictable (and things like interrupts may be handled at a lower level
within the terminal, first, before passing to a higher level and received
by Cygwin).

I'd work on trying to reproduce this in any of the terminals provided by
Cygwin... otherwise, chances are you might need to dig deeper in
MSTerminal, or even WIndows, first.

Regards,
Russell VT


On Mon, Nov 1, 2021 at 1:34 AM Naoto Aoki via Cygwin <cygwin@cygwin.com>
wrote:

> Hi,
>
> When I'm using some programs such as bash and python from cygwin under
> Windows Terminal, Ctrl+C is sometimes ignored.
> https://github.com/microsoft/terminal
>
> Normally holding 'Ctrl' and pressing 'C' will make new line.
> But, sometimes it does not and unholding 'Ctrl' makes new line under
> Windows Terminal.
> bash from msys2 does also reproduce this issue.
>
> I dug into this issue and found that this is related to
> readline and Windows 10's pseudo console (ConPTY).
> I made simple programs to reproduce this issue.
>
>  - EchoCon.cpp
>    - modification of ConPty sample code provided by Microsoft.
>      This program execute bash on pseudo console.
>      to be compiled with MSVC.
>  - getkey.cpp
>    - simple program to check Ctrl+C is passed to Cygwin program.
>      to be compiled with Cygwin gcc.
>  - rltest.cpp
>    - simple program to check SIGINT handling.
>      This program reproduces the issue.
>      If you replace readline("> ") with gets(buf),
>      then the issue does not happen.
>      to be compiled with Cygwin gcc.
>
> - The machine and OS that it is running on
>   - OS: Windows 10 Pro 19043.1288
>   - Windows Terminal: 1.11.2921.0
>
> Regards,
> Naoto Aoki
>
> --
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
>


-- 
Russell M. Van Tassell <russellvt@gmail.com>


More information about the Cygwin mailing list