Index: cygwin/fhandler.h =================================================================== RCS file: /cvs/src/src/winsup/cygwin/fhandler.h,v retrieving revision 1.149 diff -u -p -r1.149 fhandler.h --- cygwin/fhandler.h 14 Dec 2002 04:01:32 -0000 1.149 +++ cygwin/fhandler.h 17 Dec 2002 06:28:09 -0000 @@ -123,7 +123,8 @@ enum line_edit_status line_edit_signalled = -1, line_edit_ok = 0, line_edit_input_done = 1, - line_edit_error = 2 + line_edit_error = 2, + line_edit_pipe_full = 3 }; enum bg_check_types Index: cygwin/fhandler_termios.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/fhandler_termios.cc,v retrieving revision 1.36 diff -u -p -r1.36 fhandler_termios.cc --- cygwin/fhandler_termios.cc 17 Dec 2002 03:49:34 -0000 1.36 +++ cygwin/fhandler_termios.cc 17 Dec 2002 06:28:10 -0000 @@ -326,9 +326,10 @@ fhandler_termios::line_edit (const char 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; } Index: cygwin/fhandler_tty.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/fhandler_tty.cc,v retrieving revision 1.83 diff -u -p -r1.83 fhandler_tty.cc --- cygwin/fhandler_tty.cc 17 Dec 2002 03:49:34 -0000 1.83 +++ cygwin/fhandler_tty.cc 17 Dec 2002 06:28:12 -0000 @@ -169,6 +169,7 @@ fhandler_pty_master::accept_input () { debug_printf ("error writing to pipe %E"); get_ttyp ()->read_retval = -1; + ret = -1; } else { @@ -1077,11 +1078,17 @@ fhandler_pty_master::close () int fhandler_pty_master::write (const void *ptr, size_t len) { - size_t i; + int i; char *p = (char *) ptr; - for (i=0; i