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
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2015-02-26 18:58:04 +0300
committerCorinna Vinschen <corinna@vinschen.de>2015-02-26 18:58:04 +0300
commit31c123f982e36384ed1841a9c20d5810977abfff (patch)
treed7549fb6d39185723e7c94177e14f466d8b05b56
parent3667a9f44449c87e7def238cf3f43e1e3c60c45f (diff)
* fhandler_termios.cc (fhandler_termios::line_edit): Fix condition
for writing remaining bytes in readahead buffer in non-canonical mode.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler_termios.cc16
-rw-r--r--winsup/cygwin/release/1.7.356
3 files changed, 20 insertions, 7 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index f19dad5ef..c4edd694f 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_termios.cc (fhandler_termios::line_edit): Fix condition
+ for writing remaining bytes in readahead buffer in non-canonical mode.
+
2015-02-25 Corinna Vinschen <corinna@vinschen.de>
* sec_acl.cc (setacl): Always grant default owner entry
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc
index 6a4d666a0..99b661eee 100644
--- a/winsup/cygwin/fhandler_termios.cc
+++ b/winsup/cygwin/fhandler_termios.cc
@@ -393,15 +393,17 @@ fhandler_termios::line_edit (const char *rptr, size_t nread, termios& ti,
}
/* If we didn't write all bytes in non-canonical mode, write them now. */
- if (!iscanon && ralen > 0)
+ if (!iscanon && ralen > 0
+ && (ret == line_edit_ok || ret == line_edit_input_done))
{
- if (ret == line_edit_ok)
- {
- int status = accept_input ();
- if (status != 1)
- nread += ralen;
+ int status = accept_input ();
+ if (status != 1)
+ {
+ ret = status ? line_edit_error : line_edit_pipe_full;
+ nread += ralen;
}
- ret = line_edit_input_done;
+ else
+ ret = line_edit_input_done;
}
/* Adding one compensates for the postdecrement in the above loop. */
diff --git a/winsup/cygwin/release/1.7.35 b/winsup/cygwin/release/1.7.35
index cc339513b..e9c69fd55 100644
--- a/winsup/cygwin/release/1.7.35
+++ b/winsup/cygwin/release/1.7.35
@@ -56,3 +56,9 @@ Bug Fixes
- Fix a potential heap corruption in mkgroup and mkpasswd when enumerating
Unix users.
+
+- Regression in 1.7.34: A patch to the pty handling fixing the problem
+ reported in https://cygwin.com/ml/cygwin-developers/2014-11/msg00000.html
+ was incomplete and lead to undesired buffering in non-canonical mode.
+ This should be fixed now.
+ Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00608.html