Nonblocking I/O and POLL_BUG
harik at chaos.ao.net
Tue Oct 26 05:24:01 UTC 1999
Per Hedeland writes:
> Dan Merillat wrote:
> > I've coded my select/poll loops in such a way as
> >to treat -EAGAIN as a non-error, but lately I've put a spin counter in.
> Probably wise - as I wrote you should never get it on the first read
> (on the right descriptor:-) after select/poll, though in some cases it
> may make sense to keep reading until you get it.
Right... it's easier to run a loop of read returning >0, then to do
a special case over the "first read".
Although, I've never seen this OS bug myself... what platforms is it known
to occur on? (select returning readable but read returning -EAGAIN)
More information about the inn-workers