From: Bradley Nicholes Date: Thu, 3 Oct 2002 00:30:54 +0000 (+0000) Subject: Don't bother destroying the memory pools and buckets for each thread at X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b414eb0a293c1d0198c7cfd94e4a059d8aae09bc;p=apache Don't bother destroying the memory pools and buckets for each thread at 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 --- diff --git a/server/mpm/netware/mpm_netware.c b/server/mpm/netware/mpm_netware.c index 6dc280d027..229314b843 100644 --- a/server/mpm/netware/mpm_netware.c +++ b/server/mpm/netware/mpm_netware.c @@ -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();