]> granicus.if.org Git - apache/commitdiff
Closed up some holes where a thread could escape and exit without releasing
authorBradley Nicholes <bnicholes@apache.org>
Wed, 10 Apr 2002 17:13:32 +0000 (17:13 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Wed, 10 Apr 2002 17:13:32 +0000 (17:13 +0000)
the mutex.  This would leave all of the other threads deadlocked.

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

server/mpm/netware/mpm_netware.c

index f6b460f8772a115e157cf85ad70b56578eeeabae..dc337aa77fb8ea08b7235a27c0584bf2b5f3ae87 100644 (file)
@@ -518,11 +518,13 @@ got_listener:
                         */
                         ap_log_error(APLOG_MARK, APLOG_EMERG, stat, ap_server_conf,
                             "apr_accept: giving up.");
+                        apr_thread_mutex_unlock(accept_mutex);
                         clean_child_exit(APEXIT_CHILDFATAL, my_worker_num, bucket_alloc);
 
                     default:
                         ap_log_error(APLOG_MARK, APLOG_ERR, stat, ap_server_conf,
                             "apr_accept: (client socket)");
+                        apr_thread_mutex_unlock(accept_mutex);
                         clean_child_exit(1, my_worker_num, bucket_alloc);
                 }
             }
@@ -872,6 +874,7 @@ static int shutdown_listeners()
     for (lr = ap_listeners; lr; lr = lr->next) {
         apr_socket_close(lr->sd);
     }
+    ap_listeners = NULL;
     return 0;
 }