Nonblocking I/O and POLL_BUG

sthaug at nethelp.no sthaug at nethelp.no
Mon Oct 25 17:48:05 UTC 1999


> I've been running a server with this patch and with the new nonblocking.c
> that uses O_NONBLOCK instead of O_NDELAY for about a half-hour now and
> haven't seen any problems, but this code used to always be enabled for
> Solaris.  I don't have a good way of testing if it messes up any other
> platform.

Using O_NONBLOCK is safe for almost all platforms. The only one I know
of which needs something different is (old) SunOS 4.1.x, which needs
O_NDELAY. See for instance src/port/*/include/port_after.h in the BIND
8.2.2 distribution.

Steinar Haug, Nethelp consulting, sthaug at nethelp.no
----------------------------------------------------------------------

% grep PORT_NONBLOCK */include/port_after.h
aix32/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
aix4/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
aux3/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
bsdos/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
bsdos2/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
decunix/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
freebsd/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
hpux/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
hpux10/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
hpux9/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
irix/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
linux/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
lynxos/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
mpe/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
netbsd/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
next/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
openbsd/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
rhapsody/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
sco42/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
sco50/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
solaris/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
sunos/include/port_after.h:#define PORT_NONBLOCK	O_NDELAY
ultrix/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
unixware20/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
unixware212/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK
unixware7/include/port_after.h:#define PORT_NONBLOCK	O_NONBLOCK


More information about the inn-workers mailing list