* fhandler.h (line_edit_status): Add a new element.
* fhandler_termios.cc (fhandler_termios::line_edit): After accept_input, handle both potential error condition and pipe full conditions. * fhandler_tty.cc (fhandler_pty_master::accept_input): Return -1 on error. (fhandler_pty_master::write): Handle pipe full condition.
This commit is contained in:
@@ -326,9 +326,10 @@ fhandler_termios::line_edit (const char *rptr, int nread, int always_accept)
|
||||
put_readahead (c);
|
||||
if (!iscanon || always_accept || input_done)
|
||||
{
|
||||
if (!accept_input ())
|
||||
int status = accept_input ();
|
||||
if (status != 1)
|
||||
{
|
||||
ret = line_edit_error;
|
||||
ret = status ? line_edit_error : line_edit_pipe_full;
|
||||
eat_readahead (1);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user