aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-12-27 02:20:07 +0000
committerChristopher Faylor <me@cgf.cx>2003-12-27 02:20:07 +0000
commite35f197f34bf50089e5590ae5f648b62089c108c (patch)
tree1e6170b636b9111f2ff6032719069eaecdb202d6
parent1df3fbe2db6c972b8e8bdc31b473718a39bf88fa (diff)
downloadnewlib-e35f197f34bf50089e5590ae5f648b62089c108c.zip
newlib-e35f197f34bf50089e5590ae5f648b62089c108c.tar.gz
newlib-e35f197f34bf50089e5590ae5f648b62089c108c.tar.bz2
* pinfo.cc (_pinfo::set_ctty): *Always* call close on opened ctty since it
counts as an opened handle.
-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 a63ee6e..6067f5e 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 61c74db..92a9ea9 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)