From: David Reid Date: Tue, 8 Jan 2002 16:30:16 +0000 (+0000) Subject: This small patch modifies the log's to use plog instead of pconf. X-Git-Tag: 2.0.30~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c229fe732d61befff2a7fad9cc3b7a5e3913deae;p=apache This small patch modifies the log's to use plog instead of pconf. Basically pconf is cleared at different times from plog, and this has the effect of leaving stderr closed when going into the next stage of the config. This also had the effect of allowing FreeBSD with threads to create a pipe with stderr's fd at one end, and this resulted in problems with the signal polling and high cpu usage. In addition, move the clearing of plog from main.c to core.c where it seems more appropriate. This solves the first and main problem that FreeBSD has with the threaded MPM's. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92769 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/core.c b/server/core.c index 3128e2f6df..09f5d8f9a2 100644 --- a/server/core.c +++ b/server/core.c @@ -3361,7 +3361,8 @@ static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte static int core_open_logs(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { - ap_open_logs(s, pconf); + apr_pool_clear(plog); + ap_open_logs(s, plog); return OK; } diff --git a/server/main.c b/server/main.c index c8e3eec10e..dd6cf0b50b 100644 --- a/server/main.c +++ b/server/main.c @@ -411,7 +411,6 @@ int main(int argc, const char * const argv[]) ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, "Syntax OK\n"); destroy_and_exit_process(process, 0); } - apr_pool_clear(plog); if ( ap_run_open_logs(pconf, plog, ptemp, server_conf) != OK) { ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR| APLOG_NOERRNO, 0, NULL, "Unable to open logs\n"); destroy_and_exit_process(process, 1); @@ -443,7 +442,6 @@ int main(int argc, const char * const argv[]) ap_fixup_virtual_hosts(pconf, server_conf); ap_fini_vhost_config(pconf, server_conf); apr_sort_hooks(); - apr_pool_clear(plog); if ( ap_run_open_logs(pconf, plog, ptemp, server_conf) != OK) { ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR| APLOG_NOERRNO, 0, NULL, "Unable to open logs\n"); destroy_and_exit_process(process, 1);