From: Sascha Schumann Date: Sat, 29 Apr 2000 23:57:54 +0000 (+0000) Subject: Add ap_sigwait() to support old-style sigwait(). X-Git-Tag: APACHE_2_0_ALPHA_4~223 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cfb1d0be3114ff70b5025d0763b7d8d39ea166e;p=thirdparty%2Fapache%2Fhttpd.git Add ap_sigwait() to support old-style sigwait(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85101 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/acinclude.m4 b/acinclude.m4 index 2113a9423ed..1f19e59a1bb 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -177,6 +177,24 @@ unsigned long foo = INADDR_NONE; fi ]) +AC_DEFUN(APACHE_CHECK_SIGWAIT_ONE_ARG,[ + AC_CACHE_CHECK(whether sigwait takes one argument,ac_cv_sigwait_one_arg,[ + AC_TRY_COMPILE([ +#include +],[ + sigset_t set; + + sigwait(&set); +],[ + ac_cv_sigwait_one_arg=yes +],[ + ac_cv_sigwait_one_arg=no +])]) + if test "$ac_cv_sigwait_one_arg" = "yes"; then + AC_DEFINE(SIGWAIT_TAKES_ONE_ARG,1,[ ]) + fi +]) + AC_DEFUN(APACHE_CHECK_SHM_RW,[ AC_CACHE_CHECK([whether system defines SHM_R,SHM_W],ac_cv_shm_rw,[ AC_TRY_COMPILE([ diff --git a/server/mpm/config.m4 b/server/mpm/config.m4 index f431db5a4eb..2e3d53bd3c6 100644 --- a/server/mpm/config.m4 +++ b/server/mpm/config.m4 @@ -29,6 +29,7 @@ if test "$apache_cv_mpm" = "mpmt_pthread" -o "$apache_cv_mpm" = "dexter"; then fi fi +APACHE_CHECK_SIGWAIT_ONE_ARG APACHE_CHECK_SHM_RW APACHE_FAST_OUTPUT(modules/mpm/Makefile) diff --git a/server/mpm/dexter/dexter.c b/server/mpm/dexter/dexter.c index c3e6362e82b..fcebdcd2b1a 100644 --- a/server/mpm/dexter/dexter.c +++ b/server/mpm/dexter/dexter.c @@ -928,7 +928,7 @@ static void child_main(int child_num_arg) sigemptyset(&sig_mask); sigaddset(&sig_mask, SIGTERM); sigaddset(&sig_mask, SIGINT); - sigwait(&sig_mask, &signal_received); + ap_sigwait(&sig_mask, &signal_received); switch (signal_received) { case SIGTERM: case SIGINT: diff --git a/server/mpm/mpmt_pthread/mpmt_pthread.c b/server/mpm/mpmt_pthread/mpmt_pthread.c index 6c1c92b1bda..ee736b584e1 100644 --- a/server/mpm/mpmt_pthread/mpmt_pthread.c +++ b/server/mpm/mpmt_pthread/mpmt_pthread.c @@ -892,7 +892,7 @@ static void child_main(int child_num_arg) sigemptyset(&sig_mask); sigaddset(&sig_mask, SIGTERM); sigaddset(&sig_mask, SIGINT); - sigwait(&sig_mask, &signal_received); + ap_sigwait(&sig_mask, &signal_received); switch (signal_received) { case SIGTERM: case SIGINT: