Nonblocking I/O and POLL_BUG

Russ Allbery rra at stanford.edu
Mon Oct 25 23:48:03 UTC 1999


Russ Allbery <rra at Stanford.EDU> writes:

> O_NDELAY was defined to return EAGAIN.  Maybe you're thinking of the BSD
> FNDELAY, which isn't necessarily the same thing, and which is defined to
> return EWOULDBLOCK?

I should clarify that:  O_NDELAY, at least as I understand it, was defined
to return EAGAIN on writes and 0 on reads.  But I may be misunderstanding
the specification; maybe it's 0 on both and EAGAIN is purely POSIX
semantics.

In any event, looking at your table, it appears that a lot of systems were
treating O_NDELAY as synonymous with BSD FNDELAY and returning EWOULDBLOCK
(which makes one wonder if they also share the other brokenness of BSD
semantics, namely affecting the file rather than the file descriptor, not
that it matters to INN).

-- 
Russ Allbery (rra at stanford.edu)         <URL:http://www.eyrie.org/~eagle/>


More information about the inn-workers mailing list