* 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.
This commit is contained in:
Christopher Faylor 2006-01-12 05:03:15 +00:00
parent 9156ef9120
commit 750874d33d
4 changed files with 16 additions and 5 deletions

View File

@ -1,3 +1,14 @@
2006-01-12 Christopher Faylor <cgf@timesys.com>
* 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.
2006-01-10 Corinna Vinschen <corinna@vinschen.de> 2006-01-10 Corinna Vinschen <corinna@vinschen.de>
* dcrt0.cc (dll_crt0_0): Remove call to wincap.init. * dcrt0.cc (dll_crt0_0): Remove call to wincap.init.

View File

@ -1365,6 +1365,5 @@ class select_stuff
device_specific_mailslot (0) {} device_specific_mailslot (0) {}
}; };
void __stdcall set_console_state_for_spawn (); void __stdcall set_console_state_for_spawn (bool);
#endif /* _FHANDLER_H_ */ #endif /* _FHANDLER_H_ */

View File

@ -144,9 +144,10 @@ tty_list::get_tty (int n)
If it is, then just return. If the console has been initialized, then If it is, then just return. If the console has been initialized, then
set it into a more friendly state for non-cygwin apps. */ set it into a more friendly state for non-cygwin apps. */
void __stdcall 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; return;
HANDLE h = CreateFile ("CONIN$", GENERIC_READ, FILE_SHARE_WRITE, HANDLE h = CreateFile ("CONIN$", GENERIC_READ, FILE_SHARE_WRITE,

View File

@ -618,7 +618,7 @@ spawn_guts (const char * prog_arg, const char *const *argv,
else else
system_printf ("duplicate to pid_handle failed, %E"); system_printf ("duplicate to pid_handle failed, %E");
if (mode != _P_DETACH) if (mode != _P_DETACH)
set_console_state_for_spawn (); set_console_state_for_spawn (real_path.iscygexec ());
} }
/* Some file types (currently only sockets) need extra effort in the parent /* Some file types (currently only sockets) need extra effort in the parent