Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2015-04-03 07:07:35 +0300
committerCorinna Vinschen <corinna@vinschen.de>2015-04-23 22:57:11 +0300
commit252a07b0ad3353abcd0fcd9b1b65ff977acd679e (patch)
tree29a5d1d03626b7db59777e77a1e25e3f92d59781 /winsup
parentf33e34f333ca67cb932c3829acf6b6d427b78e99 (diff)
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>
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler_tty.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index bcc7df874..a36b5c2d3 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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.
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 89cc9e555..daa24ebcc 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -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