From: Jeff Trawick Date: Tue, 18 Dec 2001 21:33:27 +0000 (+0000) Subject: leaving the pipe-of-death in the ap_listeners list led to segfaults X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=86b38b9d76f2fcc41ebe06b2120165852ba99cad;p=apache leaving the pipe-of-death in the ap_listeners list led to segfaults 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 --- diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c index cb7e58f020..f0a8d3a6bb 100644 --- a/server/mpm/worker/worker.c +++ b/server/mpm/worker/worker.c @@ -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; }