From ddca580f9abc636905080a119d20461c34410bd1 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 17 Mar 2001 02:15:33 +0000 Subject: [PATCH] * fhandler_termios.cc (fhandler_termios::line_edit): Don't accept input when a signal is sent or we'll end up in an EOF/signal race. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/fhandler_termios.cc | 7 ++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index fbaeb1968..a5ec80be6 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +Fri Mar 16 21:13:23 2001 Christopher Faylor + + * fhandler_termios.cc (fhandler_termios::line_edit): Don't accept input + when a signal is sent or we'll end up in an EOF/signal race. + Fri Mar 16 20:25:40 2001 Christopher Faylor * path.cc: Translate scan states from defines to enums. diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index 7b8c71feb..948de94dc 100644 --- a/winsup/cygwin/fhandler_termios.cc +++ b/winsup/cygwin/fhandler_termios.cc @@ -299,11 +299,8 @@ fhandler_termios::line_edit (const char *rptr, int nread, int always_accept) set_input_done (ralen > 0); if (sawsig) - { - // tc->write_error = EINTR; - input_done = -1; - } - if (input_done) + input_done = -1; + else if (input_done) (void) accept_input (); return input_done;