diff options
author | Christopher Faylor <me@cgf.cx> | 2005-11-14 14:15:51 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-11-14 14:15:51 +0000 |
commit | 548d0080af5f7740bbf667051e7e5cdea5c28071 (patch) | |
tree | 838b3dccdb7c70e7328c4d85345732fb10de395a /winsup/cygwin/fhandler_console.cc | |
parent | 5a0826c3f84178498d91cd703d97791a691f6b30 (diff) | |
download | cygnal-548d0080af5f7740bbf667051e7e5cdea5c28071.tar.gz cygnal-548d0080af5f7740bbf667051e7e5cdea5c28071.tar.bz2 cygnal-548d0080af5f7740bbf667051e7e5cdea5c28071.zip |
* 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.
Diffstat (limited to 'winsup/cygwin/fhandler_console.cc')
-rw-r--r-- | winsup/cygwin/fhandler_console.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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 { |