]> sourceware.org Git - newlib-cygwin.git/commitdiff
* fhandler_console.cc (fhandler_console::input_tcsetattr): Revert
authorCorinna Vinschen <corinna@vinschen.de>
Fri, 2 Mar 2012 11:56:06 +0000 (11:56 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Fri, 2 Mar 2012 11:56:06 +0000 (11:56 +0000)
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.

winsup/cygwin/ChangeLog
winsup/cygwin/fhandler_console.cc

index ae09ed80dceffdf99c0fdcb4e3f2ee34f22b308a..8d1b8cf6e9ef3938e4a0ee91dd86953eb31ac5ce 100644 (file)
@@ -1,3 +1,11 @@
+2012-03-02  Corinna Vinschen  <corinna@vinschen.de>
+
+       * 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.
+
 2012-03-02  Corinna Vinschen  <corinna@vinschen.de>
 
        * fhandler_console.cc (fhandler_console::input_tcsetattr): Set the
index f4e8b10e68620e5824ba950148c3a9b82c2a596c..4ed56635fda9c45ea3e79878ae65b37d99fac3b2 100644 (file)
@@ -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);
     }
This page took 0.03496 seconds and 5 git commands to generate.