diff options
author | Christopher Faylor <me@cgf.cx> | 2003-09-12 06:41:53 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-09-12 06:41:53 +0000 |
commit | fb3dd716764e26ddfd105cec227a689b97ddae91 (patch) | |
tree | 252367f97a5b7b7f1725825c590ef08629dab6d1 /winsup/cygwin/fhandler_tty.cc | |
parent | 3a256354895af562cd86392c8d8c502ac4e73dc0 (diff) | |
download | cygnal-fb3dd716764e26ddfd105cec227a689b97ddae91.tar.gz cygnal-fb3dd716764e26ddfd105cec227a689b97ddae91.tar.bz2 cygnal-fb3dd716764e26ddfd105cec227a689b97ddae91.zip |
* dcrt0.cc (_dll_crt0): Accommodate breaking apart of early_stuff_init.
* exceptions.cc (early_stuff_init): Delete.
(init_console_handler): New function - top half of early_stuff_init.
(init_global_security): New function - bottom half of early_stuff_init.
(sig_handle): Avoid special hExeced test for SIGINT. Just terminate the
captive process.
(signal_exit): Add debugging output.
* fhandler_tty.cc (fhandler_tty_slave::open): Don't allocate a console if one
already seems to exist. Properly initialize ctrl-c handling if we do allocate
a console.
* winsup.h (early_stuff_init): Delete declaration.
(init_console_handler): New declaration.
(init_global_security): New declaration.
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 8ba843e17..9a1db30da 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -555,8 +555,8 @@ fhandler_tty_slave::open (path_conv *, int flags, mode_t) set_output_handle (to_master_local); set_open_status (); - if (fhandler_console::open_fhs++ == 0 && !output_done_event - && wincap.pty_needs_alloc_console ()) + if (fhandler_console::open_fhs++ == 0 && !GetConsoleCP () + && !output_done_event && wincap.pty_needs_alloc_console ()) { BOOL b; HWINSTA h = CreateWindowStation (NULL, 0, GENERIC_READ | GENERIC_WRITE, &sec_none_nih); @@ -567,8 +567,10 @@ fhandler_tty_slave::open (path_conv *, int flags, mode_t) termios_printf ("SetProcessWindowStation %d, %E", b); } b = AllocConsole (); // will cause flashing if workstation - // stuff fails - termios_printf ("%d = AllocConsole ()", b); + // stuff fails + termios_printf ("%d = AllocConsole (), %E", b); + if (b) + init_console_handler (); } termios_printf ("incremented open_fhs %d", fhandler_console::open_fhs); termios_printf ("tty%d opened", ttynum); |