From: Ryan Bloom Date: Mon, 13 Aug 2001 04:25:43 +0000 (+0000) Subject: Close a major resource leak. Everytime we had issued a X-Git-Tag: 2.0.24~114 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=999e8ff2bda793db6317f2915cdde44a135e9c12;p=apache Close a major resource leak. Everytime we had issued a graceful restart, we leaked a socket descriptor. The listening sockets should not be set inheritable, at least not at this point. We only want some of the httpd children to inherit the socket. Namely, those that will be actually serving requests. Any other child process (piped logs), should not be inheriting the sockets. PR: 7891 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90131 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 004235ddeb..a7b0e6b8f5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 2.0.24-dev + *) Close a major resource leak. Everytime we had issued a + graceful restart, we leaked a socket descriptor. + [Ryan Bloom] + *) Fix a problem with the new method code. We need to cast the 1 to an apr_int64_t or it will be treated as a 32-bit integer, and it will wrap after being shifted 32 times. diff --git a/server/listen.c b/server/listen.c index dc9dc7de5b..169c090cac 100644 --- a/server/listen.c +++ b/server/listen.c @@ -259,7 +259,6 @@ static void alloc_listener(process_rec *process, char *addr, apr_port_t port) "alloc_listener: failed to get a socket for %s", addr); return; } - apr_socket_set_inherit(new->sd); new->next = ap_listeners; ap_listeners = new; }