diff options
author | Christopher Faylor <me@cgf.cx> | 2006-03-13 18:29:48 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-03-13 18:29:48 +0000 |
commit | bbca1e4cb97050e1cc646730aedd8269f9474fc2 (patch) | |
tree | 1703fdf0f881af37489241232ddde413636be8da /winsup/cygwin/sigproc.cc | |
parent | d6382e653ac71b77675d569c225640f5b2683058 (diff) | |
download | cygnal-bbca1e4cb97050e1cc646730aedd8269f9474fc2.tar.gz cygnal-bbca1e4cb97050e1cc646730aedd8269f9474fc2.tar.bz2 cygnal-bbca1e4cb97050e1cc646730aedd8269f9474fc2.zip |
* 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.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r-- | winsup/cygwin/sigproc.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 845f7cd80..c8f11324a 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -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) - { -#ifdef DEBUGGING - system_printf ("internal signal sent while signals are on hold"); -#endif - return -1; - } else if (sig == __SIGFLUSH || sig == __SIGFLUSHFAST) return 0; - else + else if (sig == __SIGNOHOLD) { SetEvent (sigCONT); sigheld = false; } + else + { +#ifdef DEBUGGING + system_printf ("internal signal sent while signals are on hold"); +#endif + return -1; + } siginfo_t si = {0}; si.si_signo = sig; si.si_code = SI_KERNEL; |