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:
authorChristopher Faylor <me@cgf.cx>2002-12-17 06:49:34 +0300
committerChristopher Faylor <me@cgf.cx>2002-12-17 06:49:34 +0300
commitb2be3149b474c01f52851b630cd58941060edd4d (patch)
tree7cfd6c957a91c7cbfce92c206a4342982a477d8e /winsup/cygwin/fhandler_termios.cc
parent1a7ce5850576e4046068195058e693b602add674 (diff)
* fhandler_termios.cc (fhandler_termios::line_edit): Return line_edit_error and
remove last char from readahead buffer if accept_input() fails. * fhandler_tty.cc (fhandler_pty_master::accept_input): Return 0 and restore readahead buffer when tty slave pipe is full.
Diffstat (limited to 'winsup/cygwin/fhandler_termios.cc')
-rw-r--r--winsup/cygwin/fhandler_termios.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc
index 16a826bd9..e6a113241 100644
--- a/winsup/cygwin/fhandler_termios.cc
+++ b/winsup/cygwin/fhandler_termios.cc
@@ -326,7 +326,12 @@ fhandler_termios::line_edit (const char *rptr, int nread, int always_accept)
put_readahead (c);
if (!iscanon || always_accept || input_done)
{
- (void) accept_input();
+ if (!accept_input ())
+ {
+ ret = line_edit_error;
+ eat_readahead (1);
+ break;
+ }
ret = line_edit_input_done;
input_done = 0;
}