Commit b5ab4dc7 authored by Ryan Bloom's avatar Ryan Bloom
Browse files

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
parent ff513c64
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
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.
+0 −1
Original line number Diff line number Diff line
@@ -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;
}