aboutsummaryrefslogtreecommitdiff
path: root/threadproc/unix
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2001-02-27 18:33:07 +0000
committerJeff Trawick <trawick@apache.org>2001-02-27 18:33:07 +0000
commit56d68bb58b82c040f1a9c9cdea95bdcbe88c072f (patch)
tree6c234526347472d92b8ddbc70c748d3ce43a6838 /threadproc/unix
parent9824683b72127b1e28b4080cdebbe0ca8bc18b20 (diff)
downloadapr-56d68bb58b82c040f1a9c9cdea95bdcbe88c072f.tar.gz
apr-56d68bb58b82c040f1a9c9cdea95bdcbe88c072f.zip
Get the signal thread (and thus Apache threaded MPMs) working properly
on AIX and Tru64. On certain platforms, sigwait() returns EINVAL if any of various unblockable signals are included in the mask. This was first observed on AIX and Tru64. 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 off manually. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61326 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc/unix')
-rw-r--r--threadproc/unix/signals.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/threadproc/unix/signals.c b/threadproc/unix/signals.c
index 2c27f4ace..df69f7cc5 100644
--- a/threadproc/unix/signals.c
+++ b/threadproc/unix/signals.c
@@ -275,6 +275,33 @@ static void *signal_thread_func(void *signal_handler)
/* This thread will be the one responsible for handling signals */
sigfillset(&sig_mask);
+
+ /* On certain platforms, sigwait() returns EINVAL if any of various
+ * unblockable signals are included in the mask. This was first
+ * observed on AIX and Tru64.
+ */
+#ifdef SIGKILL
+ sigdelset(&sig_mask, SIGKILL);
+#endif
+#ifdef SIGSTOP
+ sigdelset(&sig_mask, SIGSTOP);
+#endif
+#ifdef SIGCONT
+ sigdelset(&sig_mask, SIGCONT);
+#endif
+#ifdef SIGWAITING
+ sigdelset(&sig_mask, SIGWAITING);
+#endif
+
+ /* 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
+ * off manually.
+ */
+#ifdef _AIX
+ sig_mask.hisigs &= 0x7FFFFFFF;
+#endif
+
while (1) {
int signal_received;