Nonblocking I/O and POLL_BUG

Russ Allbery rra at stanford.edu
Tue Oct 26 02:44:16 UTC 1999


Russ Allbery <rra at Stanford.EDU> writes:
> Per Hedeland <per at erix.ericsson.se> writes:

>> Actually if you run the test program, you'll see that current Solaris
>> (I ran it on 2.6 now) still has the same bizarre O_NDELAY
>> semantics... - but who cares.

> I'll try that; I whipped up a simpler test program that didn't reveal a
> problem, which is interesting.

Okay, checking with your program shows that O_NDELAY does the return 0
thing on pipes but not on sockets.  That means I *think* it would actually
be safe for Solaris now since I believe we use socketpair for local
connections rather than pipes, but we have HP-UX 11.00 sitting around as
well that definitely doesn't want O_NDELAY.

So I think the question on O_NONBLOCK now is do we want to just
unconditionally use it if available and have platforms like old Ultrix and
SunOS break, or do we want to devise an autoconf test for it?  If the
latter, I need a volunteer to try tests on one of those systems, since I
don't have access to any system where the test would actually fail.

And as for the POLL_BUG part, does anyone have any objections to me
enabling that code everywhere?  Sane systems shouldn't ever return EAGAIN
from reads on sockets that selected true for reading anyway, so it
shouldn't hurt other platforms.

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


More information about the inn-workers mailing list