* fhandler.h (fhandler_console::fixup_after_fork_exec): Define with additional
bool parameter. (fhandler_console::fixup_after_exec): Accommodate fixup_after_fork_exec's parameter. (fhandler_console::fixup_after_fork): Ditto. * fhandler_console.cc (fhandler_console::fixup_after_fork_exec): Avoid opening new console only when close_on_exec AND execing.
This commit is contained in:
@ -1769,12 +1769,12 @@ set_console_title (char *title)
|
||||
}
|
||||
|
||||
void
|
||||
fhandler_console::fixup_after_fork_exec ()
|
||||
fhandler_console::fixup_after_fork_exec (bool execing)
|
||||
{
|
||||
HANDLE h = get_handle ();
|
||||
HANDLE oh = get_output_handle ();
|
||||
|
||||
if (close_on_exec () || open (O_NOCTTY | get_flags (), 0))
|
||||
if ((execing && close_on_exec ()) || open (O_NOCTTY | get_flags (), 0))
|
||||
cygheap->manage_console_count ("fhandler_console::fixup_after_fork_exec", -1);
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user