From bfeed1643e92e7bc9bba7ddfa00dff0ba18f1cd7 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 2 Mar 2012 10:17:16 +0000 Subject: [PATCH] * fhandler_console.cc (fhandler_console::input_tcsetattr): Set the state of the Ctrl-C handler depending on the setting of ENABLE_PROCESSED_INPUT. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/fhandler_console.cc | 3 +++ 2 files changed, 9 insertions(+) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 974d56e84..ae09ed80d 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2012-03-02 Corinna Vinschen + + * fhandler_console.cc (fhandler_console::input_tcsetattr): Set the + state of the Ctrl-C handler depending on the setting of + ENABLE_PROCESSED_INPUT. + 2012-02-28 Eric Blake * include/sys/termios.h (tcgetsid): Fix return type. diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 01892f69e..f4e8b10e6 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1009,6 +1009,9 @@ fhandler_console::input_tcsetattr (int, struct termios const *t) res = SetConsoleMode (get_io_handle (), flags) ? 0 : -1; if (res < 0) __seterrno (); + else + /* Set state of ctrl_c handler depending on ENABLE_PROCESSED_INPUT. */ + init_console_handler (flags & ENABLE_PROCESSED_INPUT); syscall_printf ("%d = tcsetattr(,%x) enable flags %p, c_lflag %p iflag %p", res, t, flags, t->c_lflag, t->c_iflag); }