Re: select() on nonblocking sockets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

> According to the manpage select() on a nonblocking socket returns
> "readable" when a receive/read operation on the socket won't
> block. I've noticed that select occasionally returns a socket
> as "readable", but a following read() call will return EAGAIN.

This is known "feature". If some signal is pending, tcp read
is interrupted even when some data is queued. It is wrong, of course.
However there is not contradiction with some standards: error is valid
as "readable" condition.

This is not cleaned up because of some unintelligible problems with SIGURG,
which seems to want be handled before data read. It is something too obscure
to touch. 8)

Alexey
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux