]> granicus.if.org Git - apache/commitdiff
failures on the accept mutex are common at restart time, so be smart
authorJeff Trawick <trawick@apache.org>
Tue, 5 Mar 2002 21:18:07 +0000 (21:18 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 5 Mar 2002 21:18:07 +0000 (21:18 +0000)
about the log level and use APLOG_DEBUG if we're restarting

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93720 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/worker/worker.c

index 28fb275f1895f8630248423f69fc281afc42cd6e..1cb2d626999d374cef439747303752c6f343dbb0 100644 (file)
@@ -622,7 +622,13 @@ static void *listener_thread(apr_thread_t *thd, void * dummy)
 
         if ((rv = SAFE_ACCEPT(apr_proc_mutex_lock(accept_mutex)))
             != APR_SUCCESS) {
-            ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
+            int level = APLOG_EMERG;
+
+            if (ap_scoreboard_image->parent[process_slot].generation != 
+                ap_scoreboard_image->global->running_generation) {
+                level = APLOG_DEBUG; /* common to get these at restart time */
+            }
+            ap_log_error(APLOG_MARK, level, rv, ap_server_conf,
                          "apr_proc_mutex_lock failed. Attempting to shutdown "
                          "process gracefully.");
             signal_workers();
@@ -694,7 +700,13 @@ static void *listener_thread(apr_thread_t *thd, void * dummy)
             }
             if ((rv = SAFE_ACCEPT(apr_proc_mutex_unlock(accept_mutex)))
                 != APR_SUCCESS) {
-                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
+                int level = APLOG_EMERG;
+
+                if (ap_scoreboard_image->parent[process_slot].generation != 
+                    ap_scoreboard_image->global->running_generation) {
+                    level = APLOG_DEBUG; /* common to get these at restart time */
+                }
+                ap_log_error(APLOG_MARK, level, rv, ap_server_conf,
                              "apr_proc_mutex_unlock failed. Attempting to "
                              "shutdown process gracefully.");
                 signal_workers();