diff options
author | Christopher Faylor <me@cgf.cx> | 2003-12-23 22:24:38 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-12-23 22:24:38 +0000 |
commit | 05b2a10ba4187c46adef9c757e0bc01733fa06ec (patch) | |
tree | 2201057eb23e7978b0cbb16873dfa8b6c16b6c08 | |
parent | 281e419402fb1f80d794fe32e8f8e95b66941bc2 (diff) | |
download | newlib-05b2a10ba4187c46adef9c757e0bc01733fa06ec.zip newlib-05b2a10ba4187c46adef9c757e0bc01733fa06ec.tar.gz newlib-05b2a10ba4187c46adef9c757e0bc01733fa06ec.tar.bz2 |
* 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/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/fork.cc | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 7f09dd2..4d285d9 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 63ba7ab..7461c0b 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); |