You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2001/10/10 17:12:13 UTC

cvs commit: httpd-2.0/server/mpm/prefork prefork.c

trawick     01/10/10 08:12:13

  Modified:    .        CHANGES
               server/mpm/prefork prefork.c
  Log:
  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
  
  Revision  Changes    Path
  1.386     +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.385
  retrieving revision 1.386
  diff -u -r1.385 -r1.386
  --- CHANGES	2001/10/10 05:08:06	1.385
  +++ CHANGES	2001/10/10 15:12:12	1.386
  @@ -1,5 +1,8 @@
   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 <aa...@clove.org>]
   
  
  
  
  1.202     +7 -5      httpd-2.0/server/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/prefork.c,v
  retrieving revision 1.201
  retrieving revision 1.202
  diff -u -r1.201 -r1.202
  --- prefork.c	2001/09/18 22:13:58	1.201
  +++ prefork.c	2001/10/10 15:12:12	1.202
  @@ -1088,11 +1088,13 @@
       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;
   }