httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Richards <>
Subject Re: Scoreboard and sites...
Date Mon, 04 Mar 1996 21:36:00 GMT
> I didn't expect anyone to actually use this feature...

Why's it there then?

> There is a potential race condition in the implementation of listening
> on multiple ports; there isn't a lock around select. The problem that
> could occur is that two children are waiting (with select()) for
> connections on port 80 and 8001; a connection is received on port 80,
> and _both_ children might return from select() and call accept(). One
> child will receive the connection, and the other will be stuck waiting
> for another connection on port 80 _only_.
> I doubt it would be a big problem, especially if another connection
> to port 80 is imminent.

It might not be a problem if the child get's blocked on a prominent port
like port 80 of a busy ip address, but if you have one or two busy addresses
and many very quiet addresses then over time you're going to lose children to
these quiet addresses.

The solution would probably be to make the sockets non-blocking and check
for failed accepts.

View raw message