From caf27c0155d4863b6fa2173b6c8bcc90566d2782 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 28 Dec 2002 06:30:47 +0000 Subject: * fhandler_termios.cc (fhandler_termios::line_edit): Perform echo before input is accepted or suffer a "race". --- winsup/cygwin/fhandler_termios.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/fhandler_termios.cc') diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index 7b922b0f8..b9fd9e709 100644 --- a/winsup/cygwin/fhandler_termios.cc +++ b/winsup/cygwin/fhandler_termios.cc @@ -324,6 +324,8 @@ fhandler_termios::line_edit (const char *rptr, int nread, termios& ti) c = cyg_tolower (c); put_readahead (c); + if (ti.c_lflag & ECHO) + doecho (&c, 1); if (!iscanon || input_done) { int status = accept_input (); @@ -336,8 +338,6 @@ fhandler_termios::line_edit (const char *rptr, int nread, termios& ti) ret = line_edit_input_done; input_done = 0; } - if (ti.c_lflag & ECHO) - doecho (&c, 1); } if (!iscanon && ralen > 0) -- cgit v1.2.3