Cygwin: pty: Inherit typeahead data between two input pipes.

- PTY has a problem that the key input, which is typed during
  windows native app is running, disappear when it returns to shell.
  (Problem 3 in https://cygwin.com/ml/cygwin/2020-02/msg00007.html)
  This is beacuse pty has two input pipes, one is for cygwin apps
  and the other one is for native windows apps. The key input during
  windows native program is running is sent to the second input pipe
  while cygwin shell reads input from the first input pipe.
  This patch realize transfering input data between these two pipes.
This commit is contained in:
Takashi Yano
2020-02-09 23:46:59 +09:00
committed by Corinna Vinschen
parent a4ca6c4861
commit 29431fcb5b
5 changed files with 331 additions and 93 deletions

View File

@@ -1195,6 +1195,8 @@ peek_pty_slave (select_record *s, bool from_select)
fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh;
ptys->reset_switch_to_pcon ();
if (ptys->to_be_read_from_pcon ())
ptys->update_pcon_input_state (true);
if (s->read_selected)
{