]> granicus.if.org Git - apache/commitdiff
leaving the pipe-of-death in the ap_listeners list led to segfaults
authorJeff Trawick <trawick@apache.org>
Tue, 18 Dec 2001 21:33:27 +0000 (21:33 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 18 Dec 2001 21:33:27 +0000 (21:33 +0000)
during sighup processing since the pipe-of-death listen_rec was
allocated from a short-lived pool

simply allocating the pipe-of-death listen_rec from the right pool
isn't a complete fix since at that point we no longer get the
proper cleanup and we're left with a file descriptor leak

the simplest overall fix seems to be to keep the pipe-of-death out
of the ap_listeners list for now

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

server/mpm/worker/worker.c

index cb7e58f0206baedeaa638835cc358ae5bd86d7f2..f0a8d3a6bbfa4f47321477eab85740455efaebbc 100644 (file)
@@ -1493,6 +1493,11 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
         ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf,
                     "SIGHUP received.  Attempting to restart");
     }
+
+    /* get the pipe of death out of the listen_rec list */
+    ap_assert(ap_listeners->bind_addr == 0);
+    ap_listeners = ap_listeners->next;
+
     return 0;
 }