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-Tag: 2.0.44~391 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54425d03328ee2d044c4bc9a30d5148a4afdbbeb;p=thirdparty%2Fapache%2Fhttpd.git 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 6dc280d0275..229314b8431 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();