summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2016-06-01 17:04:24 +0200
committerCorinna Vinschen <corinna@vinschen.de>2016-06-01 17:04:24 +0200
commit211a942ad25224447dc02d67a31e12dcdbd6b323 (patch)
treeacf9ec83a44d9727b66ade5e6f8a5d6af7670815
parent8a31aa37bc97215f137fc705b5f6e43e06683c15 (diff)
downloadcygnal-211a942ad25224447dc02d67a31e12dcdbd6b323.tar.gz
cygnal-211a942ad25224447dc02d67a31e12dcdbd6b323.tar.bz2
cygnal-211a942ad25224447dc02d67a31e12dcdbd6b323.zip
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
-rw-r--r--winsup/cygwin/fhandler_tty.cc2
1 files changed, 1 insertions, 1 deletions
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