httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@hyperreal.org>
Subject cvs commit: apache/src http_main.c
Date Mon, 28 Jul 1997 11:02:33 GMT
dgaudet     97/07/28 04:02:32

  Modified:    src       http_main.c
  Log:
  Log a failed listen... perhaps it will help with diagnosing the bizarre
  accept() error loops.
  
  Revision  Changes    Path
  1.189     +10 -3     apache/src/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.188
  retrieving revision 1.189
  diff -u -r1.188 -r1.189
  --- http_main.c	1997/07/28 09:59:21	1.188
  +++ http_main.c	1997/07/28 11:02:31	1.189
  @@ -1948,7 +1948,12 @@
       sock_bind (s, server);
   #endif
   
  -    listen(s, listenbacklog);
  +    if (listen(s, listenbacklog) == -1) {
  +	log_unixerr ("listen", NULL, "unable to listen for connections",
  +	    server_conf);
  +	close (s);
  +	return -1;
  +    }
       return s;
   }
   
  @@ -2033,8 +2038,10 @@
   	if (fd < 0) {
   	    fd = make_sock (p, &lr->local_addr);
   	}
  -	FD_SET (fd, &listenfds);
  -	if (fd > listenmaxfd) listenmaxfd = fd;
  +	if (fd >= 0) {
  +	    FD_SET (fd, &listenfds);
  +	    if (fd > listenmaxfd) listenmaxfd = fd;
  +	}
   	lr->fd = fd;
   	if (lr->next == NULL) break;
   	lr = lr->next;
  
  
  

Mime
View raw message