* fhandler.h (fhandler_tty_slave::archetype): Make public.

(report_tty_counts): New macro.  Use throughout for reporting tty use counts.
* dtable.cc (dtable::vfork_child_dup): Add debugging output for usecount
increment.  Increment open_fhs if appropriate.
(dtable::vfork_parent_restore): "Close" artificially bumped ctty.
(dtable::vfork_child_fixup): Close ctty since it was bumped prior to vfork.
Save open_fhs around close since the closing of these handles has no effect on
the console.
* fhandler_tty.cc (fhandler_tty_slave::open): Reorganize calls to allow for
easier tracking of usecount modification.
(fhandler_tty_slave::open): Ditto.
This commit is contained in:
Christopher Faylor
2003-12-27 17:41:17 +00:00
parent fe861ce934
commit e97377932b
6 changed files with 47 additions and 16 deletions

View File

@@ -215,9 +215,7 @@ cygheap_init ()
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);
report_tty_counts (cygheap->ctty, "inherited", "incremented ", "unchanged ");
}
}