MFC: Sync new socket nonblocking/async state with file flags in
accept()
Igor Sysoev
is at rambler-co.ru
Tue Apr 8 01:59:31 PDT 2003
On Mon, 7 Apr 2003 Tor.Egge at cvsup.no.freebsd.org wrote:
> mysql changes the listen socket to nonblocking state after the
> select() but before the accept(). Without this MFC, the file flags
> will indicate that the new socket is nonblocking but read() will still
> block.
Yes. The problem is really exists as you has decribed.
And if a listen socket is made nonblocking just before select() then
a new accept()ed socket is nonblocking too.
But I do not understand one thing (it's not question to you) - why at all
the mysql folks set nonblocking state after this select() but not before
bind() ?
Igor Sysoev
http://sysoev.ru/en/
More information about the freebsd-stable
mailing list