* 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.
This commit is contained in:
@@ -293,7 +293,9 @@ _pinfo::set_ctty (tty_min *tc, int flags, fhandler_tty_slave *arch)
|
||||
if (arch)
|
||||
{
|
||||
arch->usecount++;
|
||||
debug_printf ("arch usecount for tty%d is %d", tc->ntty, arch->usecount);
|
||||
fhandler_console::open_fhs++;
|
||||
debug_printf ("tty%d, open_fhs %d, arch usecount %d", tc->ntty,
|
||||
fhandler_console::open_fhs, arch->usecount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user