Cygwin hangs up if several keys are typed during outputting a lot of texts.

* fhandler_tty.cc (fhandler_pty_slave::read): Change calculation of
	"readlen" not to use "bytes_in_pipe" value directly.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Takashi Yano 2015-04-03 13:07:35 +09:00 committed by Corinna Vinschen
parent f33e34f333
commit 252a07b0ad
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2015-04-03 Takashi Yano <takashi.yano@nifty.ne.jp>
* fhandler_tty.cc (fhandler_pty_slave::read): Change calculation of
"readlen" not to use "bytes_in_pipe" value directly.
2015-04-02 Jon TURNEY <jon.turney@dronecode.org.uk>
* include/cygwin/signal.h (struct __mcontext): 16-byte align.

View File

@ -742,7 +742,7 @@ fhandler_pty_slave::read (void *ptr, size_t& len)
return;
}
readlen = MIN (bytes_in_pipe, MIN (len, sizeof (buf)));
readlen = bytes_in_pipe ? MIN (len, sizeof (buf)) : 0;
#if 0
/* Why on earth is the read length reduced to vmin, even if more bytes