Hrvoje Niksic wrote: > Under Linux, select() may report a socket file descriptor > as "ready for reading", while nevertheless > a subsequent read blocks. Blarg. Linux is broken, then. This should not happen. > This could for example > happen when data has arrived but upon > examination has wrong checksum and is discarded. That's no excuse -- the kernel should check all its checksums *before* waking up selecting processes! > Even if you don't agree that using O_NONBLOCK with select/poll is the > best approach to non-blocking, I think there is enough existing practice > of doing this to warrant separate consideration of non-blocking sockets > (in the OS sense) and select/poll. I'm not saying there isn't merit in having support for non-blocking file descriptors, only that it's not in any sense a prerequisite or first step towards a select/poll wrapper. They're orthogonal issues, even if you might sometimes want to use them together. -- Greg
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4