Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-01-17 00:51:30 +0300
committerChristopher Faylor <me@cgf.cx>2004-01-17 00:51:30 +0300
commit001197aee3f04f077c77ec99fce715ff43fac800 (patch)
treee4d0df1c3edf97e3fd3dc78ae0015934f30d8ab9
parent4af71a917cdd86d78e783fda9fe1cb197cfee36b (diff)
* dtable.cc (dtable::vfork_parent_restore): Store ctty_on_hold prior to calling
close_all_files since it will be zeroed.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/dtable.cc3
2 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 16aa73fe5..b8fad2676 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2004-01-16 Christopher Faylor <cgf@redhat.com>
+
+ * dtable.cc (dtable::vfork_parent_restore): Store ctty_on_hold prior to
+ calling close_all_files since it will be zeroed.
+
2004-01-15 Christopher Faylor <cgf@redhat.com>
* gentls_offsets: Reinstate unlink of temp files.
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index cd41cb925..c8d80e091 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -750,6 +750,7 @@ dtable::vfork_parent_restore ()
{
lock ();
+ fhandler_tty_slave *ctty_on_hold = cygheap->ctty_on_hold;
close_all_files ();
fhandler_base **deleteme = fds;
fds = fds_on_hold;
@@ -757,7 +758,7 @@ dtable::vfork_parent_restore ()
cfree (deleteme);
unlock ();
- cygheap->ctty = cygheap->ctty_on_hold; // revert
+ cygheap->ctty = ctty_on_hold; // revert
if (cygheap->ctty)
cygheap->ctty->close (); // Undo previous bump of this archetype
cygheap->ctty_on_hold = NULL;