From 89244831608e314a7773ce7b2811148651828cbc Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 14 Jul 2011 10:02:11 +0000 Subject: [PATCH] * fhandler_console.cc (fhandler_console::input_tcsetattr): Revert to setting ENABLE_PROCESSED_INPUT depending on ISIG and IGNBRK. (fhandler_console::tcgetattr): Set ISIG depending on ENABLE_PROCESSED_INPUT as well. --- winsup/cygwin/ChangeLog | 7 +++++++ winsup/cygwin/fhandler_console.cc | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 0839a5fef..0256a82e0 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +2011-07-14 Corinna Vinschen + + * fhandler_console.cc (fhandler_console::input_tcsetattr): Revert to + setting ENABLE_PROCESSED_INPUT depending on ISIG and IGNBRK. + (fhandler_console::tcgetattr): Set ISIG depending on + ENABLE_PROCESSED_INPUT as well. + 2011-07-13 Corinna Vinschen * fhandler_serial.cc (fhandler_serial::raw_read): Handle non-blocking diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 8eb96b9a7..bf42218f4 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -970,7 +970,7 @@ fhandler_console::input_tcsetattr (int, struct termios const *t) flags &= ~ENABLE_ECHO_INPUT; } - if (!(t->c_iflag & IGNBRK)) + if ((t->c_lflag & ISIG) && !(t->c_iflag & IGNBRK)) { flags |= ENABLE_PROCESSED_INPUT; } @@ -1025,7 +1025,9 @@ fhandler_console::tcgetattr (struct termios *t) if (flags & ENABLE_LINE_INPUT) t->c_lflag |= ICANON; - if (!(flags & ENABLE_PROCESSED_INPUT)) + if (flags & ENABLE_PROCESSED_INPUT) + t->c_lflag |= ISIG; + else t->c_iflag |= IGNBRK; /* What about ENABLE_WINDOW_INPUT