Cygwin: console: Share readahead buffer within the same process.

- The cause of the problem reported in
  https://www.cygwin.com/ml/cygwin/2020-01/msg00220.html is that the
  chars input before dup() cannot be read from the new file descriptor.
  This is because the readahead buffer (rabuf) in the console is newly
  created by dup(), and does not inherit from the parent. This patch
  fixes the issue.
This commit is contained in:
Takashi Yano
2020-01-27 21:14:32 +09:00
committed by Corinna Vinschen
parent 7d68ffadd3
commit 5ba41ad6e9
5 changed files with 109 additions and 54 deletions

View File

@@ -525,7 +525,7 @@ fhandler_pty_master::accept_input ()
}
else
{
char *p = rabuf;
char *p = rabuf ();
DWORD rc;
DWORD written = 0;