From: Jeff Trawick Date: Tue, 28 Mar 2000 22:59:05 +0000 (+0000) Subject: Tweaked APR initialization and termination so that the lifetime X-Git-Tag: APACHE_2_0_ALPHA_2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d43419b03bc4743fcd8a739138ce6f6414b01e6;p=thirdparty%2Fapache%2Fhttpd.git Tweaked APR initialization and termination so that the lifetime of memory management mutexes is longer than the lifetime of managed memory. APR apps must now call ap_terminate(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84846 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/main.c b/server/main.c index 44e0828ac03..d4e72e3b6a0 100644 --- a/server/main.c +++ b/server/main.c @@ -193,6 +193,7 @@ static void show_compile_settings(void) static void destroy_and_exit_process(process_rec *process, int process_exit_value) { ap_destroy_pool(process->pool); /* and destroy all descendent pools */ + ap_terminate(); exit(process_exit_value); } @@ -209,6 +210,7 @@ static process_rec *create_process(int argc, const char **argv) ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, NULL, "ap_create_context() failed to create " "initial context"); + ap_terminate(); exit(1); } @@ -298,7 +300,9 @@ API_EXPORT_NONSTD(int) main(int argc, char *argv[]) ap_context_t *pcommands; /* Pool for -C and -c switches */ module **mod; +#ifndef WIN32 /* done in main_win32.c */ ap_initialize(); +#endif process = create_process(argc, (const char **)argv); pglobal = process->pool; pconf = process->pconf;