Skip to content

Commit 50a8772

Browse files
committed
Cygwin: pty: Clear discard_input flag on master write()
Currently, the first transfer_input() after Ctrl-C does not work because discard_input flag remains asserted. This can cause loosing typeahead input for non-cygwin app after Ctrl-C. With this patch, the discard_input flag is cleared on master write() because the input is new valid input after discarding input. Fixes: 4e16e57 ("Cygwin: pty: Discard input already accepted on interrupt.") Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> Reviewed-by: Corinna Vinschen <corinna@vinschen.de>
1 parent 1bddcff commit 50a8772

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

winsup/cygwin/fhandler/pty.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,6 +2149,8 @@ fhandler_pty_master::write (const void *ptr, size_t len)
21492149

21502150
push_process_state process_state (PID_TTYOU);
21512151

2152+
get_ttyp ()->discard_input = false;
2153+
21522154
if (get_ttyp ()->pcon_start)
21532155
{ /* Reaches here when pseudo console initialization is on going. */
21542156
/* Pseudo condole support uses "CSI6n" to get cursor position.

0 commit comments

Comments
 (0)