Re: HP/UX 11 test_socket failure

Neal Norwitz <[email protected]> Sat, 02 Nov 2002 14:35:28 -0500
Newsgroups gmane.comp.python.snake-farm.user
Message-ID <[email protected]>
On Sun, Oct 20, 2002 at 11:35:26AM -0600, Mats Wichmann wrote:
> 
> >However, I'm not sure any other OS makes this distinction. If not, it
> >would be better to switch to O_NONBLOCK for all archs rather than
> >complicate the code with another ifdef.
> 
> From a standards perspective, O_NONBLOCK has superseded O_NDELAY.
> For example, the SUS marked O_NDELAY deprecated, SUSv2 dropped
> it from all mention (except to note that it had been removed).
> 
> Don't know how that ties in with the implementation perspective,
> however.

On Linux and FreeBSD (at least) O_NONBLOCK and O_NDELAY are the same.
On Solaris, HP-UX, and Tru64 (Dec UNIX), they are or will be
different in the future.

O_NONBLOCK is consistently the POSIX version.  Since that seems
to be the behaviour we are depending upon, I have changed the
code to prefer O_NONBLOCK.  If there is no O_NONBLOCK, use O_NDELAY.

I'll be checking in the fix soon.

Neal