Commit 2424c7f0 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

Exit when we can't listen on any of the configured ports. This

is the same behavior as 1.3, and it avoids having the MPMs to
deal with bogus ap_listen_rec structures.

This also backs out some circumventions I and Greg Ames had added
to prefork; these are no longer necessary because of this change.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91494 13f79535-47bb-0310-9956-ffa450edef68
parent b4bb9c9b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
Changes with Apache 2.0.27-dev

  *) Exit when we can't listen on any of the configured ports.  This
     is the same behavior as 1.3, and it avoids having the MPMs to
     deal with bogus ap_listen_rec structures.  [Jeff Trawick]

  *) Cleanup the proxy code that creates a request to the origin
     server.  This change adds an optional hook, which allows modules
     to gain control while the request is created if the proxy module
+4 −0
Original line number Diff line number Diff line
@@ -287,6 +287,10 @@ int ap_listen_open(process_rec *process, apr_port_t port)
		++num_open;
		lr->active = 1;
	    }
            else {
                /* fatal error */
                return -1;
            }
	}
    }

+10 −14
Original line number Diff line number Diff line
@@ -663,7 +663,6 @@ static void child_main(int child_num_arg)
		}
		first_lr=lr;
		do {
                    if (lr->active) {
                    apr_os_sock_get(&sockdes, lr->sd);
                    if (FD_ISSET(sockdes, &main_fds))
                        goto got_listener;
@@ -671,7 +670,6 @@ static void child_main(int child_num_arg)
                    if (!lr)
                        lr = ap_listeners;
		}
		}
		while (lr != first_lr);
		/* FIXME: if we get here, something bad has happened, and we're
		   probably gonna spin forever.
@@ -1090,14 +1088,12 @@ 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;
}