httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: cvs commit: apache-1.3/src/main http_main.c
Date Fri, 02 Mar 2001 13:05:03 GMT
martin@apache.org writes:

> martin      01/03/02 04:35:59
> 
>   Modified:    src/main http_main.c
>   Log:
>   Ignasi writes:
>     Both mod_ssl and KAME-ipv6 patch sets are adding the
>     if (fd >= 0) in the FD_SET(fd, &listenfds) on http_main.c.
>     I think this patch doesn't concert neither to mod_ssl nor to
>   IPv6.

>   --- http_main.c	2001/02/22 16:07:16	1.530
>   +++ http_main.c	2001/03/02 12:35:53	1.531
>   @@ -3548,7 +3548,8 @@
>    	else {
>    	    ap_note_cleanups_for_socket(p, fd);
>    	}
>   -	FD_SET(fd, &listenfds);
>   +	if (fd >= 0) /* avoid negative offsets ;-) */
>   +	    FD_SET(fd, &listenfds);

So how do we get a negative fd here?  A really high file descriptor?
The error cases for make_sock() seem to be handled by exiting the
process.

So maybe it avoids a segfault, but now we have a configured listening
socket we won't wake up for.  Which is worse?  Perhaps segfault is
better? (actually, I'd rather us report the error and terminate)

Fully prepared to be told I'm confused...

-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Mime
View raw message