* 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.
This commit is contained in:
Christopher Faylor
2002-12-17 03:49:34 +00:00
parent 1a7ce58505
commit b2be3149b4
3 changed files with 42 additions and 31 deletions

View File

@@ -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;
}