summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/pinfo.cc3
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,5 +1,10 @@
2003-12-26 Christopher Faylor <cgf@redhat.com>
+ * pinfo.cc (_pinfo::set_ctty): *Always* call close on opened ctty since
+ it counts as an opened handle.
+
+2003-12-26 Christopher Faylor <cgf@redhat.com>
+
* fhandler.h (fhandler_tty_master::fixup_after_fork): Remove
declaration.
(fhandler_tty_master::fixup_after_exec): Ditto.
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)