httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: apache-2.0/src/modules/mpm/spmt_os2 spmt_os2.c
Date Mon, 10 Jul 2000 22:06:01 GMT
This checkin breaks the original prefork MPM and the OS/2 MPM. See below.


On Mon, Jul 10, 2000 at 09:37:25PM -0000, rbb@locus.apache.org wrote:
>...
>   --- listen.c	2000/06/17 16:29:48	1.25
>   +++ listen.c	2000/07/10 21:37:13	1.26
>...
>   +#ifndef WIN32
>   +int ap_setup_listeners(server_rec *s)
>   +{
>   +    ap_listen_rec *lr;
>   +    int num_listeners = 0;
>   +    if (ap_listen_open(s->process, s->port)) {
>   +       return 0;
>   +    }
>   +    for (lr = ap_listeners; lr; lr = lr->next) {
>   +        num_listeners++;
>   +    }
>   +    return num_listeners;
>   +}
>   +#endif
>...
>   --- prefork.c	2000/07/10 18:21:22	1.114
>   +++ prefork.c	2000/07/10 21:37:21	1.115
>   @@ -1283,29 +1283,6 @@
>        }
>    }
>    
>   -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;
>   -}

The above function is very different from the new ap_setup_listeners()

>...
>   @@ -1337,7 +1314,7 @@
>     
>        ap_log_pid(pconf, ap_pid_fname);
>    
>   -    if (setup_listeners(s)) {
>   +    if (ap_setup_listeners(s)) {
>    	/* XXX: hey, what's the right way for the mpm to indicate a fatal error? */
>    	return 1;
>        }

ap_setup_listeners() has a different return value. The above check is not
appropriate.

>...
>   --- spmt_os2.c	2000/07/10 18:21:24	1.50
>   +++ spmt_os2.c	2000/07/10 21:37:23	1.51
>   @@ -741,27 +741,6 @@
>        return 0;
>    }
>    
>   -
>   -
>   -static int setup_listeners(ap_pool_t *pchild, ap_pollfd_t **listen_poll)
>   -{
>   -    ap_listen_rec *lr;
>   -    int numfds = 0;
>   -
>   -    for (lr = ap_listeners; lr; lr = lr->next) {
>   -        numfds++;
>   -    }
>   -
>   -    ap_setup_poll(listen_poll, numfds, pchild);
>   -
>   -    for (lr = ap_listeners; lr; lr = lr->next) {
>   -	ap_add_poll_socket(*listen_poll, lr->sd, APR_POLLIN);
>   -    }
>   -    return 0;
>   -}

Same problem: the above code is very different from ap_setup_listeners().

>...
>   @@ -796,7 +775,7 @@
>        THREAD_GLOBAL(pchild) = pchild;
>        ap_create_pool(&ptrans, pchild);
>    
>   -    if (setup_listeners(pchild, &listen_poll)) {
>   +    if (ap_setup_listeners(pchild, &listen_poll)) {
>    	clean_child_exit(1);
>        }

And again: different return values.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message