From 211a942ad25224447dc02d67a31e12dcdbd6b323 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 1 Jun 2016 17:04:24 +0200 Subject: Revert "Cygwin hangs up if several keys are typed during outputting a lot of texts." This reverts commit 252a07b0ad3353abcd0fcd9b1b65ff977acd679e. This change introduced a hang in certain scenarios, for an example see https://cygwin.com/ml/cygwin/2016-05/msg00318.html --- winsup/cygwin/fhandler_tty.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'winsup/cygwin') diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index a39a56674..6c00d6112 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -767,7 +767,7 @@ fhandler_pty_slave::read (void *ptr, size_t& len) return; } - readlen = bytes_in_pipe ? MIN (len, sizeof (buf)) : 0; + readlen = MIN (bytes_in_pipe, MIN (len, sizeof (buf))); #if 0 /* Why on earth is the read length reduced to vmin, even if more bytes -- cgit v1.2.3