httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject cvs commit: apache-1.3/src/main http_main.c
Date Tue, 06 Apr 2004 16:42:20 GMT
jim         2004/04/06 09:42:20

  Modified:    src/main http_main.c
  Log:
  handle fact that lsockets aren't closed and reopened
  across restarts, so there's a potential issue with a
  socket being marked (still) as non-blocking.
  
  Submitted by:	Jeff
  Reviewed by:	Jim
  
  Revision  Changes    Path
  1.612     +11 -0     apache-1.3/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
  retrieving revision 1.611
  retrieving revision 1.612
  diff -u -r1.611 -r1.612
  --- http_main.c	29 Mar 2004 17:33:52 -0000	1.611
  +++ http_main.c	6 Apr 2004 16:42:19 -0000	1.612
  @@ -4034,6 +4034,17 @@
               lr = lr->next;
           } while (lr != ap_listeners);
       }
  +    else {
  +        /* we could be restarting with a single remaining listening
  +         * socket, still in non-blocking state from a previous
  +         * generation which had more listening sockets
  +         */
  +        if (soblock(ap_listeners->fd) < 0) {
  +            ap_log_error(APLOG_MARK, APLOG_CRIT, NULL,
  +                         "A listening socket could not be made blocking.");
  +            exit(APEXIT_INIT);
  +        }
  +    }
   #endif /* NONBLOCK_WHEN_MULTI_LISTEN */
       
   #ifdef NO_SERIALIZED_ACCEPT
  
  
  

Mime
View raw message