aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/sigproc.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-03-27 01:10:48 +0000
committerChristopher Faylor <me@cgf.cx>2006-03-27 01:10:48 +0000
commitec54178c36ea087420badce9f38cbc7456f16ca4 (patch)
treed6df24799ecb00d3b50839a0e38e2cfe4cda3925 /winsup/cygwin/sigproc.cc
parent8d6d4807744085aa270072c252e70d243f9e4539 (diff)
downloadnewlib-ec54178c36ea087420badce9f38cbc7456f16ca4.zip
newlib-ec54178c36ea087420badce9f38cbc7456f16ca4.tar.gz
newlib-ec54178c36ea087420badce9f38cbc7456f16ca4.tar.bz2
* sigproc.cc (wait_sig): Move myself manipulation...
(wait_for_sigthread): ...to here.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r--winsup/cygwin/sigproc.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 8de1ff8..02f5387 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -141,6 +141,10 @@ wait_for_sigthread ()
api_fatal ("couldn't create signal pipe, %E");
ProtectHandle (my_readsig);
myself->sendsig = my_sendsig;
+
+ myself->process_state |= PID_ACTIVE;
+ myself->process_state &= ~PID_INITIALIZING;
+
sigproc_printf ("wait_sig_inited %p", wait_sig_inited);
HANDLE hsig_inited = wait_sig_inited;
WaitForSingleObject (hsig_inited, INFINITE);
@@ -1130,17 +1134,10 @@ wait_sig (VOID *)
sigCONT = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);
- /* Setting dwProcessId flags that this process is now capable of receiving
- signals. Prior to this, dwProcessId was set to the windows pid of
- of the original windows process which spawned us unless this was a
- "toplevel" process. */
- myself->process_state |= PID_ACTIVE;
- myself->process_state &= ~PID_INITIALIZING;
-
- _sig_tls = &_my_tls;
sigproc_printf ("myself->dwProcessId %u", myself->dwProcessId);
SetEvent (wait_sig_inited);
+ _sig_tls = &_my_tls;
_sig_tls->init_threadlist_exceptions ();
debug_printf ("entering ReadFile loop, my_readsig %p, myself->sendsig %p",
my_readsig, myself->sendsig);