* dtable.cc (dtable::vfork_parent_restore): Avoid double close of ctty when

ctty == ctty_on_hold.
This commit is contained in:
Christopher Faylor 2004-01-17 05:49:42 +00:00
parent 85b6d63ba4
commit 42f5993f2d
2 changed files with 10 additions and 3 deletions

View File

@ -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

View File

@ -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;