This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] Revert "Cygwin hangs up if several keys are typed during outputting a lot of texts."


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=211a942ad25224447dc02d67a31e12dcdbd6b323

commit 211a942ad25224447dc02d67a31e12dcdbd6b323
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Wed Jun 1 17:04:24 2016 +0200

    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

Diff:
---
 winsup/cygwin/fhandler_tty.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index a39a566..6c00d61 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]