public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/cygwin-3_3-branch] Cygwin: console: Fix a bug on input when signalled.
@ 2021-11-02 14:47 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2021-11-02 14:47 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a4bda4f62652321a78909f31b39b40b4ede5c1c4
commit a4bda4f62652321a78909f31b39b40b4ede5c1c4
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
Date: Tue Nov 2 12:40:10 2021 +0900
Cygwin: console: Fix a bug on input when signalled.
- This patch fixes the bug that Ctrl-C sometimes does not work as
expected in Windows Terminal.
Addresses:
https://cygwin.com/pipermail/cygwin/2021-November/249749.html
Diff:
---
winsup/cygwin/fhandler_console.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index aee5e8284..2e754a132 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -1178,6 +1178,10 @@ out:
/* Discard processed recored. */
DWORD dummy;
DWORD discard_len = min (total_read, i + 1);
+ /* If input is signalled, do not discard input here because
+ tcflush() is already called from line_edit(). */
+ if (stat == input_signalled && !(ti->c_lflag & NOFLSH))
+ discard_len = 0;
if (discard_len)
ReadConsoleInputW (get_handle (), input_rec, discard_len, &dummy);
return stat;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-02 14:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-02 14:47 [newlib-cygwin/cygwin-3_3-branch] Cygwin: console: Fix a bug on input when signalled Corinna Vinschen
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).