* 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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user