Commit fd76efca authored by Jeff Trawick's avatar Jeff Trawick
Browse files

prefork: Don't segfault when we are able to listen on some but

not all of the configured ports.

Other points to ponder:

  why no log message for the segfault?

  similar change would seem to be needed in other MPMs...  we
  may be adding bogus entries to the poll set


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91399 13f79535-47bb-0310-9956-ffa450edef68
parent 5971050e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
Changes with Apache 2.0.26-dev

  *) prefork: Don't segfault when we are able to listen on some but
     not all of the configured ports.  [Jeff Trawick]

  *) Build mod_so even if no core modules are built shared.
     [Aaron Bannert <aaron@clove.org>]

+7 −5
Original line number Diff line number Diff line
@@ -1088,12 +1088,14 @@ static int setup_listeners(server_rec *s)
    listenmaxfd = -1;
    FD_ZERO(&listenfds);
    for (lr = ap_listeners; lr; lr = lr->next) {
        if (lr->active) {
            apr_os_sock_get(&sockdes, lr->sd);
            FD_SET(sockdes, &listenfds);
            if (sockdes > listenmaxfd) {
                listenmaxfd = sockdes;
            }
        }
    }
    return 0;
}