From 750874d33de8778a469cc8c19ad6e4a509078f9b Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 12 Jan 2006 05:03:15 +0000 Subject: * fhandler.h (set_console_state_for_spawn): Whackamole the argument back to a bool. * spawn.cc (spawn_guts): Ditto, i.e., once again call set_console_state_for_spawn with an indication of whether we're about to start a cygwin process. * fhandler_console.cc (set_console_state_for_spawn): Don't set the console state if we know we're starting a cygwin process or if we're using a "real" tty. --- winsup/cygwin/fhandler_console.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/fhandler_console.cc') diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 2cf0219f2..5ca26d2f3 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -144,9 +144,10 @@ tty_list::get_tty (int n) If it is, then just return. If the console has been initialized, then set it into a more friendly state for non-cygwin apps. */ void __stdcall -set_console_state_for_spawn () +set_console_state_for_spawn (bool iscyg) { - if (fhandler_console::need_invisible ()) + if (fhandler_console::need_invisible () || iscyg + || (myself->ctty > 0 && myself->ctty != TTY_CONSOLE)) return; HANDLE h = CreateFile ("CONIN$", GENERIC_READ, FILE_SHARE_WRITE, -- cgit v1.2.3