From: Jeff Trawick Date: Sat, 24 Jun 2000 03:47:04 +0000 (+0000) Subject: Fix a few problems checking and logging errors in prefork. X-Git-Tag: APACHE_2_0_ALPHA_5~254 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a7b78139a596e3f67e640b444b6ea80bed8cb93d;p=apache Fix a few problems checking and logging errors in prefork. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85682 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 107238da03..9d328ab605 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -914,7 +914,7 @@ static void child_main(int child_num_arg) * lead to never-ending loops here. So it seems best * to just exit in most cases. */ - switch (errno) { + switch (stat) { #ifdef EPROTO /* EPROTO on certain older kernels really means * ECONNABORTED, so we need to ignore it for them. @@ -971,25 +971,25 @@ static void child_main(int child_num_arg) * Ben Hyde noted that temporary ENETDOWN situations * occur in mobile IP. */ - ap_log_error(APLOG_MARK, APLOG_EMERG, errno, ap_server_conf, - "accept: giving up."); + ap_log_error(APLOG_MARK, APLOG_EMERG, stat, ap_server_conf, + "ap_accept: giving up."); clean_child_exit(APEXIT_CHILDFATAL); #endif /*ENETDOWN*/ #ifdef TPF case EINACT: - ap_log_error(APLOG_MARK, APLOG_EMERG, errno, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_EMERG, stat, ap_server_conf, "offload device inactive"); clean_child_exit(APEXIT_CHILDFATAL); break; default: ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, ap_server_conf, - "select/accept error (%u)", errno); + "select/accept error (%u)", stat); clean_child_exit(APEXIT_CHILDFATAL); #else default: - ap_log_error(APLOG_MARK, APLOG_ERR, errno, ap_server_conf, - "accept: (client socket)"); + ap_log_error(APLOG_MARK, APLOG_ERR, stat, ap_server_conf, + "ap_accept: (client socket)"); clean_child_exit(1); #endif } @@ -1253,7 +1253,7 @@ static void perform_idle_server_maintenance(void) if(make_child(ap_server_conf, free_slots[i], now) == -1) { if(free_length == 1) { shutdown_pending = 1; - ap_log_error(APLOG_MARK, APLOG_EMERG, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, ap_server_conf, "No active child processes: shutting down"); } } @@ -1321,7 +1321,7 @@ static void process_child_status(ap_proc_t *pid, ap_wait_t status) #endif #else ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, - ap_server_conf, + 0, ap_server_conf, "child pid %ld exit signal %d", (long)pid->pid, WTERMSIG(status)); #endif