From 548d0080af5f7740bbf667051e7e5cdea5c28071 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 14 Nov 2005 14:15:51 +0000 Subject: * 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. --- winsup/cygwin/fhandler_console.cc | 4 ++-- 1 file changed, 2 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 3c812ce33..496abfd75 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -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 { -- cgit v1.2.3