If somebody wants to play, this is perhaps all that is necessary.  I
need to straighten out a test script problem on the machine that
regularly exhibits the segfault, then try this out there.

The caveat with this is that if a worker thread is doing
time-consuming processing (e.g., lengthy database transaction) then
the pthread_join will hang for a while and the parent will probably
nail us.

Index: server/mpm/worker/worker.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/worker/worker.c,v
retrieving revision 1.121
diff -u -r1.121 worker.c
--- server/mpm/worker/worker.c  1 May 2002 07:15:39 -0000       1.121
+++ server/mpm/worker/worker.c  1 May 2002 13:34:58 -0000
@@ -1312,16 +1312,14 @@
             }
         }
 
-        if (rv == AP_GRACEFUL) {
-            /* A terminating signal was received. Now join each of the
-             * workers to clean them up.
-             *   If the worker already exited, then the join frees
-             *   their resources and returns.
-             *   If the worker hasn't exited, then this blocks until
-             *   they have (then cleans up).
-             */
-            join_workers(ts->listener, threads);
-        }
+        /* A terminating signal was received. Now join each of the
+         * workers to clean them up.
+         *   If the worker already exited, then the join frees
+         *   their resources and returns.
+         *   If the worker hasn't exited, then this blocks until
+         *   they have (then cleans up).
+         */
+        join_workers(ts->listener, threads);
     }
 
     free(threads);

-- 
Jeff Trawick | [EMAIL PROTECTED]
Born in Roswell... married an alien...

Reply via email to