From 1df3fbe2db6c972b8e8bdc31b473718a39bf88fa Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 27 Dec 2003 01:59:29 +0000 Subject: * fhandler.h (fhandler_tty_master::fixup_after_fork): Remove declaration. (fhandler_tty_master::fixup_after_exec): Ditto. * fhandler_tty.cc (fhandler_tty_master::init): Fix so that children do not inherit master tty handles. (fhandler_tty_master::fixup_after_fork): Remove, since it was never used. (fhandler_tty_master::fixup_after_exec): Ditto. * pinfo.cc (_pinfo::set_ctty): Increment open_fhs when ctty is set. * cygheap.cc (cygheap_init): Ditto. * syscalls.cc (setsid): *Always* call close on opened ctty since the archetype is associated with the ctty and it counts as an opened handle. * tty.cc (tty::common_init): Don't protect input/output mutex since it confuses subsequent fork/execs when CYGWIN=tty. --- winsup/cygwin/fhandler_tty.cc | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'winsup/cygwin/fhandler_tty.cc') diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index d5cbcadd1..ff1d48f24 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -78,6 +78,7 @@ fhandler_tty_master::init () set_winsize (false); inuse = get_ttyp ()->create_inuse (TTY_MASTER_ALIVE); + set_close_on_exec (true); cygthread *h; h = new cygthread (process_input, cygself, "ttyin"); @@ -1402,20 +1403,6 @@ fhandler_pty_master::set_close_on_exec (int val) } } -void -fhandler_tty_master::fixup_after_fork (HANDLE child) -{ - fhandler_pty_master::fixup_after_fork (child); - console->fixup_after_fork (child); -} - -void -fhandler_tty_master::fixup_after_exec (HANDLE) -{ - console->close (); - init_console (); -} - int fhandler_tty_master::init_console () { -- cgit v1.2.3