lkml.org 
[lkml]   [1997]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: InfoWorld web server shootout#
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


\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.052 / U:0.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site