]> granicus.if.org Git - apache/commitdiff
Don't bother destroying the memory pools and buckets for each thread at
authorBradley Nicholes <bnicholes@apache.org>
Thu, 3 Oct 2002 00:30:54 +0000 (00:30 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Thu, 3 Oct 2002 00:30:54 +0000 (00:30 +0000)
during shutdown since it will all be cleaned up at termination anyway.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97067 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/netware/mpm_netware.c

index 6dc280d02752cb8aedb484f70c394d7c3965c86f..229314b8431061439142e39a8f88c58f60bb16c1 100644 (file)
@@ -203,12 +203,21 @@ static int show_settings = 0;
 #define DBPRINT2(s,v1,v2)
 #endif
 
+/* volatile just in case */
+static int volatile shutdown_pending;
+static int volatile restart_pending;
+static int volatile is_graceful;
+static int volatile wait_to_finish=1;
+ap_generation_t volatile ap_my_generation=0;
+
 /* a clean exit from a child with proper cleanup */
 static void clean_child_exit(int code, int worker_num, apr_pool_t *ptrans, apr_bucket_alloc_t *bucket_alloc) __attribute__ ((noreturn));
 static void clean_child_exit(int code, int worker_num, apr_pool_t *ptrans, apr_bucket_alloc_t *bucket_alloc)
 {
-    apr_bucket_alloc_destroy(bucket_alloc);
-    apr_pool_destroy(ptrans);
+    if (!shutdown_pending) {
+        apr_bucket_alloc_destroy(bucket_alloc);
+        apr_pool_destroy(ptrans);
+    }
 
     atomic_dec (&worker_thread_count);
     if (worker_num >=0)
@@ -265,13 +274,6 @@ AP_DECLARE(apr_status_t) ap_mpm_query(int query_code, int *result)
  * Connection structures and accounting...
  */
 
-/* volatile just in case */
-static int volatile shutdown_pending;
-static int volatile restart_pending;
-static int volatile is_graceful;
-static int volatile wait_to_finish=1;
-ap_generation_t volatile ap_my_generation=0;
-
 static void mpm_term(void)
 {
     RemoveConsoleHandler();