diff options
author | Christopher Faylor <me@cgf.cx> | 2003-12-27 04:59:29 +0300 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-12-27 04:59:29 +0300 |
commit | 1df3fbe2db6c972b8e8bdc31b473718a39bf88fa (patch) | |
tree | 12bfaf8a6f6d1d05ed0551f0202ca4e31288a5f6 /winsup/cygwin/cygheap.cc | |
parent | 56b5feb639f51385da560289e1c1e65512fb3f67 (diff) |
* 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.
Diffstat (limited to 'winsup/cygwin/cygheap.cc')
-rw-r--r-- | winsup/cygwin/cygheap.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 6859e4335..16a95f441 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -212,6 +212,13 @@ cygheap_init () && (set_process_privilege (SE_CREATE_GLOBAL_NAME, true) >= 0 || GetLastError () == ERROR_NO_SUCH_PRIVILEGE) ? "Global\\" : ""); + if (cygheap->ctty) + { + fhandler_console::open_fhs++; + debug_printf ("tty%d, open_fhs %d, arch usecount %d", + cygheap->ctty->get_ttyp ()->ntty, + fhandler_console::open_fhs, cygheap->ctty->usecount); + } } /* Copyright (C) 1997, 2000 DJ Delorie */ |