From e35f197f34bf50089e5590ae5f648b62089c108c Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 27 Dec 2003 02:20:07 +0000 Subject: [PATCH] * pinfo.cc (_pinfo::set_ctty): *Always* call close on opened ctty since it counts as an opened handle. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/pinfo.cc | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) 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) -- 2.43.5