[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Ctrl+C is sometimes ignored on Windows 10's pseudo console

From: Naoto Aoki
Subject: Ctrl+C is sometimes ignored on Windows 10's pseudo console
Date: Sat, 30 Oct 2021 18:06:01 +0900


When I'm using some programs such as bash and python from msys2 under
Windows 10's pseudo console (ConPty), Ctrl+C is sometimes ignored.
Normally holding 'Ctrl' and pressing 'C' will make new line.
But, sometimes it does not and unholding 'Ctrl' makes new line under Conpty.
bash from Cygwin does also reproduce this issue.

To reproduce this problem, please read the instructions here.

I dug into this issue and this is related to readline.
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 MSYS2 program.
     to be compiled with MSYS2 gcc (or Cygwin gcc?). not MINGW.
 - 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 MSYS2 gcc.

- The version number and release status of Readline
  - msys2 libreadline 8.1.001-1
  - msys2 libreadline-devel 8.1.001-1
- The machine and OS that it is running on
  - OS: Windows 10 Pro 19043.1288
  - MSYS2: msys2-runtime 3.2.0-15
  - Windows Terminal: 1.11.2921.0
- A list of the compilation flags or the contents of `config.h', if appropriate
  - I don't know since I'm using binary package.
- a description of the bug
  - Written above
- a recipe for recreating the bug reliably
  - Written above
- a fix for the bug if you have one!
  - Sorry, I don't have.

Naoto Aoki

reply via email to

[Prev in Thread] Current Thread [Next in Thread]