Re: InfoWorld web server shootout#

Alex Belits (abelits@phobos.illtel.denver.co.us)
Thu, 10 Jul 1997 17:10:08 -0700 (PDT)


On Thu, 10 Jul 1997, David S. Miller wrote:

> Really, people should revisit Linus's posting on select()
> wake_up_one() dangers from long ago. It is no trivial to preserve the
> sematics, if it is possible at all.
>
> For example if the process chosen to wake up does not complete the
> accept() under FreeBSD, what happens?

In apache example accept() is blocking -- no select() is involved in
that case -- just multiple waiting accept()'s. select(), if called is
supposed just to return handle as available for reading, thus if select()
and accept() are called simultaneously from two processes, and they
share the same file handle, and both are blocking, "right"
behaviour should cause accept() succeed and select() remain waiting.
Nothing seriously wrong will happen if select() still will get file
descriptor as ready, but whoever will try to accept() after that, will
fail. But it's definitely will be wrong, if when multiple accept()'s are
called, and someone connects, every accept() is finished, but only one of
them succeeds.

--
Alex