]> sourceware.org Git - newlib-cygwin.git/commitdiff
* fhandler_termios.cc (fhandler_termios::line_edit): Fix condition
authorCorinna Vinschen <corinna@vinschen.de>
Thu, 26 Feb 2015 15:58:04 +0000 (15:58 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Thu, 26 Feb 2015 15:58:04 +0000 (15:58 +0000)
for writing remaining bytes in readahead buffer in non-canonical mode.

winsup/cygwin/ChangeLog
winsup/cygwin/fhandler_termios.cc
winsup/cygwin/release/1.7.35

index f19dad5ef71686dd4cae4ab54e94d3aa8454dec3..c4edd694f47a360031089121c32a6d20dd37b17c 100644 (file)
@@ -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
index 6a4d666a0816aab88bf3cdf6297832aa3cda9f47..99b661eee8ae8ac16e206dce62076b50a12b200a 100644 (file)
@@ -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. */
index cc339513bc2c4ef0ba2b3dd7dfb56615cac438f8..e9c69fd5544bb4f93534f39f4cc241c866637574 100644 (file)
@@ -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
This page took 0.033364 seconds and 5 git commands to generate.