* sigproc.cc (create_signal_arrive): New (temporary?) function to create
signal_arrived event. (sigproc_init): Use create_signal_arrived. * fork.cc (fork_child): Create signal_arrived early.
This commit is contained in:
parent
b6e69d53f6
commit
d0bed66e45
|
@ -1,3 +1,10 @@
|
||||||
|
2005-04-01 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
|
* sigproc.cc (create_signal_arrive): New (temporary?) function to
|
||||||
|
create signal_arrived event.
|
||||||
|
(sigproc_init): Use create_signal_arrived.
|
||||||
|
* fork.cc (fork_child): Create signal_arrived early.
|
||||||
|
|
||||||
2005-04-01 Corinna Vinschen <corinna@vinschen.de>
|
2005-04-01 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* fork.cc (fork_child): Fixup SYSV IPC shared memory before fixing
|
* fork.cc (fork_child): Fixup SYSV IPC shared memory before fixing
|
||||||
|
|
|
@ -156,6 +156,7 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
|
||||||
{
|
{
|
||||||
extern void fixup_hooks_after_fork ();
|
extern void fixup_hooks_after_fork ();
|
||||||
extern void fixup_timers_after_fork ();
|
extern void fixup_timers_after_fork ();
|
||||||
|
extern void create_signal_arrived ();
|
||||||
debug_printf ("child is running. pid %d, ppid %d, stack here %p",
|
debug_printf ("child is running. pid %d, ppid %d, stack here %p",
|
||||||
myself->pid, myself->ppid, __builtin_frame_address (0));
|
myself->pid, myself->ppid, __builtin_frame_address (0));
|
||||||
|
|
||||||
|
@ -199,6 +200,8 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
|
||||||
if (fixup_mmaps_after_fork (hParent))
|
if (fixup_mmaps_after_fork (hParent))
|
||||||
api_fatal ("recreate_mmaps_after_fork_failed");
|
api_fatal ("recreate_mmaps_after_fork_failed");
|
||||||
|
|
||||||
|
create_signal_arrived ();
|
||||||
|
|
||||||
#ifdef USE_SERVER
|
#ifdef USE_SERVER
|
||||||
/* Incredible but true: If we use sockets and SYSV IPC shared memory,
|
/* Incredible but true: If we use sockets and SYSV IPC shared memory,
|
||||||
there's a good chance that a duplicated socket in the child occupies
|
there's a good chance that a duplicated socket in the child occupies
|
||||||
|
|
|
@ -462,13 +462,23 @@ sig_dispatch_pending (bool fast)
|
||||||
(void) sig_send (myself, fast ? __SIGFLUSHFAST : __SIGFLUSH);
|
(void) sig_send (myself, fast ? __SIGFLUSHFAST : __SIGFLUSH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void __stdcall
|
||||||
|
create_signal_arrived ()
|
||||||
|
{
|
||||||
|
if (signal_arrived)
|
||||||
|
return;
|
||||||
|
/* local event signaled when main thread has been dispatched
|
||||||
|
to a signal handler function. */
|
||||||
|
signal_arrived = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
|
||||||
|
ProtectHandle (signal_arrived);
|
||||||
|
}
|
||||||
|
|
||||||
/* Message initialization. Called from dll_crt0_1
|
/* Message initialization. Called from dll_crt0_1
|
||||||
*
|
|
||||||
* This routine starts the signal handling thread. The wait_sig_inited
|
This routine starts the signal handling thread. The wait_sig_inited
|
||||||
* event is used to signal that the thread is ready to handle signals.
|
event is used to signal that the thread is ready to handle signals.
|
||||||
* We don't wait for this during initialization but instead detect it
|
We don't wait for this during initialization but instead detect it
|
||||||
* in sig_send to gain a little concurrency.
|
in sig_send to gain a little concurrency. */
|
||||||
*/
|
|
||||||
void __stdcall
|
void __stdcall
|
||||||
sigproc_init ()
|
sigproc_init ()
|
||||||
{
|
{
|
||||||
|
@ -480,10 +490,7 @@ sigproc_init ()
|
||||||
*/
|
*/
|
||||||
new_muto (sync_proc_subproc);
|
new_muto (sync_proc_subproc);
|
||||||
|
|
||||||
/* local event signaled when main thread has been dispatched
|
create_signal_arrived ();
|
||||||
to a signal handler function. */
|
|
||||||
signal_arrived = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
|
|
||||||
ProtectHandle (signal_arrived);
|
|
||||||
|
|
||||||
hwait_sig = new cygthread (wait_sig, cygself, "sig");
|
hwait_sig = new cygthread (wait_sig, cygself, "sig");
|
||||||
hwait_sig->zap_h ();
|
hwait_sig->zap_h ();
|
||||||
|
|
Loading…
Reference in New Issue