diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2012-03-02 11:56:06 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2012-03-02 11:56:06 +0000 |
commit | 109bc583039f714444b2ac7ad0dc8c7491dc69e5 (patch) | |
tree | ff2c2106066c290f13b376a8ba1dc26f4aafee86 /winsup/cygwin/fhandler_console.cc | |
parent | bfeed1643e92e7bc9bba7ddfa00dff0ba18f1cd7 (diff) | |
download | cygnal-109bc583039f714444b2ac7ad0dc8c7491dc69e5.tar.gz cygnal-109bc583039f714444b2ac7ad0dc8c7491dc69e5.tar.bz2 cygnal-109bc583039f714444b2ac7ad0dc8c7491dc69e5.zip |
* fhandler_console.cc (fhandler_console::input_tcsetattr): Revert
prevois patch.
(fhandler_console::open_setup): Install Ctrl-C handler here, if this
console is the controlling tty and the process hasn't been started by
a Cygwin process.
Diffstat (limited to 'winsup/cygwin/fhandler_console.cc')
-rw-r--r-- | winsup/cygwin/fhandler_console.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index f4e8b10e6..4ed56635f 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -828,7 +828,8 @@ void fhandler_console::open_setup (int flags) { set_flags ((flags & ~O_TEXT) | O_BINARY); - myself->set_ctty (this, flags); + if (myself->set_ctty (this, flags) && !myself->cygstarted) + init_console_handler (true); } int @@ -1009,9 +1010,6 @@ 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); } |