summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-01-17 05:49:42 +0000
committerChristopher Faylor <me@cgf.cx>2004-01-17 05:49:42 +0000
commit42f5993f2d2e362910d86df6eb90f47754ed4661 (patch)
treef3f02ba6836de9a54acfbedc5dfa849651b2b5a0 /winsup/cygwin
parent85b6d63ba4230613ce5f602cc76c0a6460c4676a (diff)
downloadcygnal-42f5993f2d2e362910d86df6eb90f47754ed4661.tar.gz
cygnal-42f5993f2d2e362910d86df6eb90f47754ed4661.tar.bz2
cygnal-42f5993f2d2e362910d86df6eb90f47754ed4661.zip
* dtable.cc (dtable::vfork_parent_restore): Avoid double close of ctty when
ctty == ctty_on_hold.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/dtable.cc8
2 files changed, 10 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 746730b15..2bcbfaa27 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2004-01-17 Christopher Faylor <cgf@redhat.com>
+
+ * dtable.cc (dtable::vfork_parent_restore): Avoid double close of ctty
+ when ctty == ctty_on_hold.
+
2004-01-16 Christopher Faylor <cgf@redhat.com>
* fhandler_console.cc (fhandler_console::close): Remove obsolete test
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index c8d80e091..d943e166b 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -758,9 +758,11 @@ dtable::vfork_parent_restore ()
cfree (deleteme);
unlock ();
- cygheap->ctty = ctty_on_hold; // revert
- if (cygheap->ctty)
- cygheap->ctty->close (); // Undo previous bump of this archetype
+ if (cygheap->ctty != ctty_on_hold)
+ {
+ cygheap->ctty = ctty_on_hold; // revert
+ cygheap->ctty->close (); // Undo previous bump of this archetype
+ }
cygheap->ctty_on_hold = NULL;
return;