diff options
author | Christopher Faylor <me@cgf.cx> | 2002-12-17 03:49:34 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-12-17 03:49:34 +0000 |
commit | b2be3149b474c01f52851b630cd58941060edd4d (patch) | |
tree | 7cfd6c957a91c7cbfce92c206a4342982a477d8e /winsup/cygwin/fhandler_termios.cc | |
parent | 1a7ce5850576e4046068195058e693b602add674 (diff) | |
download | cygnal-b2be3149b474c01f52851b630cd58941060edd4d.tar.gz cygnal-b2be3149b474c01f52851b630cd58941060edd4d.tar.bz2 cygnal-b2be3149b474c01f52851b630cd58941060edd4d.zip |
* 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.cc | 7 |
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; } |