[ee122] accept() blocks too much...

Vern Paxson vern at icir.org
Thu Sep 20 21:19:24 PDT 2007

> I'm running select() and the listening port is returning that it's ready to
> add a new connection, but then it'll say it's ready even though there are no
> pending connections

This pretty much has to be a bug somewhere in your code, since the
semantics are indeed that if select() shows activity on a listen socket,
then a single call to accept will retrieve a new connection from it.
A zillion servers out there rely on exactly this ...

> Server is hung on accept()

You should use a debugger such as gdb to verify that select() really is
showing that the descriptor you're passing to accept() has activity.


More information about the ee122 mailing list