From 8ed5c9b6297dce0115a462e6ae1a644a9a278bdb Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 30 Dec 2003 01:57:16 +0000 Subject: Move open_fhs from fhandler.h to cygheap.h for easier tracking. Accommodate this change throughout. * dtable.cc (dtable::add_archetype): Use correct count when iterating through *active* archetypes. * dtable.cc (dtable::fixup_after_exec): Close handle if close_on_exec and archetype exists since archetype currently does not set windows close-on-exec flag (FIXME). * fhandler_tty.cc (fhandler_tty_slave::open): Change debugging output slightly. (fhandler_tty_slave::close): Ditto. (fhandler_tty_slave::fixup_after_fork): Just report on inherited use counts since since archetype currently does not set windows close-on-exec flag (FIXME). * pinfo.cc (_pinfo::set_ctty): Change debugging output slightly. * cygheap.cc (cygheap_init): Remove open_fhs accommodation and use count reporting. * perthread.h (vfork_save::fhctty): New element. * perthread.h (vfork_save::open_fhs): New element. * fork.cc (vfork): Muck around with ctty and open_fhs stuff, both of which are now saved in the vfork_save structure. --- winsup/cygwin/pinfo.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/pinfo.cc') diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 0472145f8..4ce702e6a 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -257,7 +257,7 @@ pinfo::set_acl() void _pinfo::set_ctty (tty_min *tc, int flags, fhandler_tty_slave *arch) { - debug_printf ("ctty %d", ctty); + debug_printf ("checking if /dev/tty%d differs from input", ctty); if ((ctty < 0 || ctty == tc->ntty) && !(flags & O_NOCTTY)) { ctty = tc->ntty; @@ -292,7 +292,7 @@ _pinfo::set_ctty (tty_min *tc, int flags, fhandler_tty_slave *arch) if (arch) { arch->usecount++; - fhandler_console::open_fhs++; + cygheap->open_fhs++; report_tty_counts (cygheap->ctty, "ctty", "incremented ", ""); } } -- cgit v1.2.3