You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by gs...@locus.apache.org on 2000/07/13 11:17:53 UTC
cvs commit: apache-2.0/src/modules/mpm/prefork prefork.c
gstein 00/07/13 02:17:51
Modified: src/modules/mpm/prefork prefork.c
Log:
reverse the setup_listeners() change from a few days ago. it broke prefork
by not getting listenmaxfd set, nor listenfds.
Revision Changes Path
1.118 +24 -1 apache-2.0/src/modules/mpm/prefork/prefork.c
Index: prefork.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -r1.117 -r1.118
--- prefork.c 2000/07/11 22:12:17 1.117
+++ prefork.c 2000/07/13 09:17:46 1.118
@@ -1257,6 +1257,29 @@
}
}
+static int setup_listeners(server_rec *s)
+{
+ ap_listen_rec *lr;
+ int sockdes;
+
+ if (ap_listen_open(s->process, s->port)) {
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, 0, s,
+ "no listening sockets available, shutting down");
+ return -1;
+ }
+
+ listenmaxfd = -1;
+ FD_ZERO(&listenfds);
+ for (lr = ap_listeners; lr; lr = lr->next) {
+ ap_get_os_sock(&sockdes, lr->sd);
+ FD_SET(sockdes, &listenfds);
+ if (sockdes > listenmaxfd) {
+ listenmaxfd = sockdes;
+ }
+ }
+ return 0;
+}
+
/* Useful to erase the status of children that might be from previous
* generations */
static void ap_prefork_force_reset_connection_status(long conn_id)
@@ -1288,7 +1311,7 @@
ap_log_pid(pconf, ap_pid_fname);
- if (ap_setup_listeners(s)) {
+ if (setup_listeners(s)) {
/* XXX: hey, what's the right way for the mpm to indicate a fatal error? */
return 1;
}
Re: cvs commit: apache-2.0/src/modules/mpm/prefork prefork.c
Posted by Greg Ames <gr...@raleigh.ibm.com>.
gstein@locus.apache.org wrote:
>
> gstein 00/07/13 02:17:51
>
> Modified: src/modules/mpm/prefork prefork.c
> Log:
> reverse the setup_listeners() change from a few days ago. it broke prefork
> by not getting listenmaxfd set, nor listenfds.
With this and Ryan's change to ap_listen.h and listen.c, it's working again.
Thanks!
Greg