Changes with Apache 2.3.0
[Remove entries to the current 2.0 and 2.2 section below, when backported]
+ *) beos MPM: Create pmain pool and run modules' child_init hooks when
+ entering ap_mpm_run(), then destroy pmain when exiting ap_mpm_run().
+ [Chris Darroch]
+
*) netware MPM: Destroy pmain pool when exiting ap_mpm_run() so that
cleanups registered in modules' child_init hooks are performed.
[Chris Darroch]
apr_thread_mutex_t *accept_mutex = NULL;
static apr_pool_t *pconf; /* Pool for config stuff */
+static apr_pool_t *pmain; /* Pool for httpd child stuff */
static int server_pid;
exit_thread(code);
}
+/* proper cleanup when returning from ap_mpm_run() */
+static void mpm_main_cleanup(void)
+{
+ if (pmain) {
+ apr_pool_destroy(pmain);
+ }
+}
+
/*****************************************************************
* Connection structures and accounting...
set_signals();
+ apr_pool_create(&pmain, pconf);
+ ap_run_child_init(pmain, ap_server_conf);
+
/* Sanity checks to avoid thrashing... */
if (max_spare_threads < min_spare_threads )
max_spare_threads = min_spare_threads;
}
if (one_process) {
+ mpm_main_cleanup();
return 1;
}
"caught SIGTERM, shutting down");
}
+ mpm_main_cleanup();
return 1;
}
*/
apr_thread_mutex_destroy(accept_mutex);
+ mpm_main_cleanup();
return 0;
}