]> granicus.if.org Git - apache/commitdiff
This small patch modifies the log's to use plog instead of pconf.
authorDavid Reid <dreid@apache.org>
Tue, 8 Jan 2002 16:30:16 +0000 (16:30 +0000)
committerDavid Reid <dreid@apache.org>
Tue, 8 Jan 2002 16:30:16 +0000 (16:30 +0000)
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

server/core.c
server/main.c

index 3128e2f6df43277fbaa1cd5a78e703fb4d1bd439..09f5d8f9a213d82c82d8bd09c0524e37a74b40e5 100644 (file)
@@ -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;  
 }
 
index c8e3eec10eaad737a3f76935f9ebcca22b29c046..dd6cf0b50b6def86e8794d3c6a991a3fbb9e862a 100644 (file)
@@ -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);