* dcrt0.cc (dll_crt0_0): Reorganize so that sigproc_init is called a little
later. Add a comment. * fork.cc (resume_child): Make void. (frok::parent): Only zero pi when necessary. Explicitly zero si. Set this_errno when child_copy fails. Accommodate change to resume_child. * sigproc.cc (sigalloc): Move global_sigs initialization here. (sigproc_init): Move global_sigs. (sig_send): Just check for flush signals once. * wincap.h: Define supports_setconsolectrlhandler_null throughout. * wincap.cc: Ditto.
This commit is contained in:
@@ -112,6 +112,7 @@ sigalloc ()
|
||||
{
|
||||
cygheap->sigs = global_sigs =
|
||||
(struct sigaction *) ccalloc (HEAP_SIGS, NSIG, sizeof (struct sigaction));
|
||||
global_sigs[SIGSTOP].sa_flags = SA_RESTART | SA_NODEFER;
|
||||
}
|
||||
|
||||
void __stdcall
|
||||
@@ -479,14 +480,12 @@ sigproc_init ()
|
||||
ProtectHandle (wait_sig_inited);
|
||||
|
||||
/* sync_proc_subproc is used by proc_subproc. It serialises
|
||||
* access to the children and proc arrays.
|
||||
*/
|
||||
access to the children and proc arrays. */
|
||||
sync_proc_subproc.init ("sync_proc_subproc");
|
||||
|
||||
hwait_sig = new cygthread (wait_sig, 0, cygself, "sig");
|
||||
hwait_sig->zap_h ();
|
||||
|
||||
global_sigs[SIGSTOP].sa_flags = SA_RESTART | SA_NODEFER;
|
||||
sigproc_printf ("process/signal handling enabled, state %p", myself->process_state);
|
||||
}
|
||||
|
||||
@@ -514,20 +513,20 @@ sig_send (_pinfo *p, int sig)
|
||||
sigheld = true;
|
||||
else if (!sigheld)
|
||||
/* nothing */;
|
||||
else if (sig != __SIGNOHOLD && sig != __SIGFLUSH && sig != __SIGFLUSHFAST)
|
||||
else if (sig == __SIGFLUSH || sig == __SIGFLUSHFAST)
|
||||
return 0;
|
||||
else if (sig == __SIGNOHOLD)
|
||||
{
|
||||
SetEvent (sigCONT);
|
||||
sigheld = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef DEBUGGING
|
||||
system_printf ("internal signal sent while signals are on hold");
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
else if (sig == __SIGFLUSH || sig == __SIGFLUSHFAST)
|
||||
return 0;
|
||||
else
|
||||
{
|
||||
SetEvent (sigCONT);
|
||||
sigheld = false;
|
||||
}
|
||||
siginfo_t si = {0};
|
||||
si.si_signo = sig;
|
||||
si.si_code = SI_KERNEL;
|
||||
|
Reference in New Issue
Block a user