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
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>]
listenmaxfd = -1;
FD_ZERO(&listenfds);
for (lr = ap_listeners; lr; lr = lr->next) {
- apr_os_sock_get(&sockdes, lr->sd);
- FD_SET(sockdes, &listenfds);
- if (sockdes > listenmaxfd) {
- listenmaxfd = sockdes;
- }
+ if (lr->active) {
+ apr_os_sock_get(&sockdes, lr->sd);
+ FD_SET(sockdes, &listenfds);
+ if (sockdes > listenmaxfd) {
+ listenmaxfd = sockdes;
+ }
+ }
}
return 0;
}