diff options
author | Christopher Faylor <me@cgf.cx> | 2013-01-21 17:17:44 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2013-01-21 17:17:44 +0000 |
commit | 93ff4bbee0f74342000a6c90ae175170a640a0b8 (patch) | |
tree | b0315a5cf35a4b841afd9a943fe612171ed23368 | |
parent | 3b1a8c572f8cea988ac1ede84000401f6d8c402e (diff) | |
download | newlib-93ff4bbee0f74342000a6c90ae175170a640a0b8.zip newlib-93ff4bbee0f74342000a6c90ae175170a640a0b8.tar.gz newlib-93ff4bbee0f74342000a6c90ae175170a640a0b8.tar.bz2 |
* dcrt0.cc (dll_crt0_1): Comment assumption.
* exceptions.cc (sigpacket::setup_handler): Avoid sending signals during fork
processing.
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/exceptions.cc | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5796902..51e2467 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,11 @@ 2013-01-21 Christopher Faylor <me.cygwin2013@cgf.cx> + * dcrt0.cc (dll_crt0_1): Comment assumption. + * exceptions.cc (sigpacket::setup_handler): Avoid sending signals + during fork processing. + +2013-01-21 Christopher Faylor <me.cygwin2013@cgf.cx> + * dcrt0.cc (dll_crt0_1): Flag that we are working "incyg". Handle any signals (presumably exiting signals) which may have come in while we are in the process of setting up. diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 931ebd9..094c0a0 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -891,6 +891,8 @@ dll_crt0_1 (void *) _tlstop = (char *) fork_info->stacktop; } + /* Not resetting _my_tls.incyg here because presumably fork will overwrite + it with the value of the forker and all will be good. */ longjmp (fork_info->jmp, true); } diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 0a02f0d..5a8474b 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -789,6 +789,10 @@ sigpacket::setup_handler (void *handler, struct sigaction& siga, _cygtls *tls) goto out; } + while (in_forkee) + yield (); /* Won't be able to send signals until we're finished + processing fork(). */ + for (int n = 0; n < CALL_HANDLER_RETRY_OUTER; n++) { for (int i = 0; i < CALL_HANDLER_RETRY_INNER; i++) |