* pinfo.cc (_pinfo::set_ctty): *Always* call close on opened ctty since it

counts as an opened handle.
This commit is contained in:
Christopher Faylor
2003-12-27 02:20:07 +00:00
parent 1df3fbe2db
commit e35f197f34
2 changed files with 6 additions and 2 deletions

View File

@ -286,8 +286,7 @@ _pinfo::set_ctty (tty_min *tc, int flags, fhandler_tty_slave *arch)
{
syscall_printf ("ctty %p, usecount %d", cygheap->ctty,
cygheap->ctty->usecount);
if (!--cygheap->ctty->usecount)
cygheap->ctty->close ();
cygheap->ctty->close ();
}
cygheap->ctty = arch;
if (arch)