Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-12-28 09:30:47 +0300
committerChristopher Faylor <me@cgf.cx>2002-12-28 09:30:47 +0300
commitcaf27c0155d4863b6fa2173b6c8bcc90566d2782 (patch)
treed338b8ab5ec99a54d3cca3f535ab08601eca5d1f
parent0f109fb869aabcfb831e6f93975f6005757de2dd (diff)
* fhandler_termios.cc (fhandler_termios::line_edit): Perform echo before input
is accepted or suffer a "race".
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler_termios.cc4
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index e012624bf..2cb8e8899 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-28 Christopher Faylor <cgf@redhat.com>
+
+ * fhandler_termios.cc (fhandler_termios::line_edit): Perform echo
+ before input is accepted or suffer a "race".
+
2002-12-27 Christopher Faylor <cgf@redhat.com>
* fhandler.h (fhandler_tty_master::set_winsize): Declare new function.
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)