diff options
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r-- | winsup/cygwin/dtable.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index e5bb80218..141e17382 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -745,8 +745,13 @@ dtable::vfork_parent_restore () fds = fds_on_hold; fds_on_hold = NULL; cfree (deleteme); - ReleaseResourceLock (LOCK_FD_LIST, WRITE_LOCK | READ_LOCK, "restore"); + + cygheap->ctty = cygheap->ctty_on_hold; // revert + if (cygheap->ctty) + cygheap->ctty->close (); // Undo previous bump of this archetype + cygheap->ctty_on_hold = NULL; + return; } @@ -777,6 +782,12 @@ dtable::vfork_child_fixup () cfree (fds_on_hold); fds_on_hold = NULL; + if (cygheap->ctty_on_hold) + { + cygheap->ctty_on_hold->close (); + cygheap->ctty_on_hold = NULL; + } + return; } |