diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index a63ee6e9d..6067f5e1b 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2003-12-26 Christopher Faylor + + * pinfo.cc (_pinfo::set_ctty): *Always* call close on opened ctty since + it counts as an opened handle. + 2003-12-26 Christopher Faylor * fhandler.h (fhandler_tty_master::fixup_after_fork): Remove diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 61c74db2a..92a9ea9aa 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -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)