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>2003-12-24 01:24:38 +0300
committerChristopher Faylor <me@cgf.cx>2003-12-24 01:24:38 +0300
commit05b2a10ba4187c46adef9c757e0bc01733fa06ec (patch)
tree2201057eb23e7978b0cbb16873dfa8b6c16b6c08
parent281e419402fb1f80d794fe32e8f8e95b66941bc2 (diff)
* fork.cc (fork_child): After a pthread/fork, ensure that impure pointer stuff
which resides in parent is propagated to child thread.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fork.cc3
2 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 7f09dd2cc..4d285d955 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2003-12-23 Christopher Faylor <cgf@redhat.com>
+ * fork.cc (fork_child): After a pthread/fork, ensure that impure
+ pointer stuff which resides in parent is propagated to child thread.
+
+2003-12-23 Christopher Faylor <cgf@redhat.com>
+
* exceptions.cc (set_signal_mask): Redefine to not pass by address.
Report calculated mask in debugging output.
* sigproc.h (set_signal_mask): Reflect above change in declaration.
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 63ba7abf2..7461c0bb4 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -264,7 +264,8 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
{
_main_tls = &_my_tls;
_main_tls->init_thread (NULL);
- // memcpy (&_main_tls->local_clib, _impure_ptr, sizeof (*_main_tls->local_lib));
+ _main_tls->local_clib = *_impure_ptr;
+ _impure_ptr = &_main_tls->local_clib;
}
set_file_api_mode (current_codepage);