diff options
author | Jeff Trawick <trawick@apache.org> | 2002-08-08 19:14:19 +0000 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2002-08-08 19:14:19 +0000 |
commit | 3c1a6293f40822d97df74537ab6ad274be2d3b24 (patch) | |
tree | 9629538e2b99e2e45e35bbbbca5db25af1f9277e | |
parent | af9ad622a5467e7e164aaf1a500e5e9c83156cd7 (diff) | |
download | apr-3c1a6293f40822d97df74537ab6ad274be2d3b24.tar.gz |
In apr_signal_thread() remove synchronous signals from the mask
passed to sigwait(). It is never valid for them to be there.
Some platforms silently ignore them, some return EINVAL, some
don't process it as desired.
One problem was found with an old Apache 2.0.30 build on AIX.
sig_coredump() wasn't getting called when a plug-in generated SIGABRT.
Removing SIGABRT from the signal mask passed to sigwait() by the
main worker thread fixed the problem. After reviewing sigwait()
documentation it was clear that none of the synchronous signals
should be in the mask passed to sigwait().
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63802 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | CHANGES | 5 | ||||
-rw-r--r-- | threadproc/unix/signals.c | 3 |
2 files changed, 8 insertions, 0 deletions
@@ -1,5 +1,10 @@ Changes with APR b1 + *) In apr_signal_thread() remove synchronous signals from the mask + passed to sigwait(). It is never valid for them to be there. + Some platforms silently ignore them, some return EINVAL, some + don't process it as desired. [Jeff Trawick] + *) Change config.nice generation to always expand variables. [Justin Erenkrantz] diff --git a/threadproc/unix/signals.c b/threadproc/unix/signals.c index b8cfc6798..fa4867b9b 100644 --- a/threadproc/unix/signals.c +++ b/threadproc/unix/signals.c @@ -374,6 +374,9 @@ APR_DECLARE(apr_status_t) apr_signal_thread(int(*signal_handler)(int signum)) sigdelset(&sig_mask, SIGWAITING); #endif + /* no synchronous signals should be in the mask passed to sigwait() */ + remove_sync_sigs(&sig_mask); + /* On AIX (4.3.3, at least), sigwait() won't wake up if the high- * order bit of the second word of flags is turned on. sigdelset() * returns an error when trying to turn this off, so we'll turn it |