From 42f5993f2d2e362910d86df6eb90f47754ed4661 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 17 Jan 2004 05:49:42 +0000 Subject: * dtable.cc (dtable::vfork_parent_restore): Avoid double close of ctty when ctty == ctty_on_hold. --- winsup/cygwin/dtable.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/dtable.cc') 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; -- cgit v1.2.3