]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Tweaked APR initialization and termination so that the lifetime
authorJeff Trawick <trawick@apache.org>
Tue, 28 Mar 2000 22:59:05 +0000 (22:59 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 28 Mar 2000 22:59:05 +0000 (22:59 +0000)
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

server/main.c

index 44e0828ac039638674c91cfdb6d86f08b12219d2..d4e72e3b6a0c35bb1f844c0d044d2463cc867eff 100644 (file)
@@ -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;