Darwin (OS/X) doesn't define pthread_kill :( This is a brutal hack, and I
don't like it, but it works...
Pier
Index: server/mpm/worker//worker.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/mpm/worker/worker.c,v
retrieving revision 1.109
diff -U3 -r1.109 worker.c
--- server/mpm/worker//worker.c 29 Mar 2002 14:33:50 -0000 1.109
+++ server/mpm/worker//worker.c 3 Apr 2002 12:29:56 -0000
@@ -259,7 +259,11 @@
* up the listener thread since it is the only thread with SIGHUP
* unblocked, but that doesn't work on Linux
*/
+#ifdef DARWIN
+ kill(ap_my_pid, LISTENER_SIGNAL);
+#else
pthread_kill(*listener_os_thread, LISTENER_SIGNAL);
+#endif
}
#define ST_INIT 0
@@ -1043,7 +1047,11 @@
*/
iter = 0;
+#ifdef DARWIN
+ while (iter < 10 && kill(ap_my_pid, 0) == 0) {
+#else
while (iter < 10 && pthread_kill(*listener_os_thread, 0) == 0) {
+#endif
/* listener not dead yet */
apr_sleep(APR_USEC_PER_SEC / 2);
wakeup_listener();