public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Russell VT <russellvt@gmail.com>
To: Naoto Aoki <naoto.november@gmail.com>
Cc: cygwin <cygwin@cygwin.com>
Subject: Re: Ctrl+C is sometimes ignored on Windows Terminal
Date: Mon, 1 Nov 2021 01:50:07 -0700	[thread overview]
Message-ID: <CANV2+nXKH92HCdwP=YZyHVWG=qz3CGNT=NEbWFceVNK7HNMzAg@mail.gmail.com> (raw)
In-Reply-To: <CANoQjJvm5NgztRQo1y-wn1_kGO-j6JKmGsqUkOm1yaNBb7qQvQ@mail.gmail.com>

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>

  reply	other threads:[~2021-11-01  8:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01  8:33 Naoto Aoki
2021-11-01  8:50 ` Russell VT [this message]
2021-11-01 14:07 ` Doug Henderson
2021-11-02  3:34 ` Takashi Yano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANV2+nXKH92HCdwP=YZyHVWG=qz3CGNT=NEbWFceVNK7HNMzAg@mail.gmail.com' \
    --to=russellvt@gmail.com \
    --cc=cygwin@cygwin.com \
    --cc=naoto.november@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).