[Python-Dev] Monterey (64-bit AIX) screws up the poll() implementation, I think

Tim Peters tim_one@email.msn.com
Tue, 10 Oct 2000 16:47:06 -0400

[Trent Mick]
> test_poll.py currently fails on Monterey (64-bit AIX) because of
> a difference in the system poll() function as compared to Linux.
> On Linux (and as required by the Signle Unix Specification:
> http://www.opengroup.org/onlinepubs/007908799/xsh/poll.html) if
> you "poll()" a bogus file descriptor you get a POLLNVAL return value in
> the 'revents' field of the structure sent to poll().
> ...
> Monterey decided to return -1 instead. [Aside: However, 'revents's type is
> "short" so the Python interface to poll() (using PyInt_FromLong) actually
> interprets that as -32768 instead.]
> Questions:
> 1. Can anybody offer an opinion if this is Python's or Monterey's
>    problem?

Both.  "Another day, another incompatible flavor of Unix(tm)."  In the early
days, Guido actually hoped he could get away without a massive hack like
autoconf <wink>.

> 2. Can anybody tell me where I can browse the POSIX spec to see if this
>    breaks POSIX compliance as well?

Nowhere:  ISO/ANSI stds are generally never available online.  They get the
bulk of their money from selling standards.


is a good place to buy.  There are about 20 POSIX-related stds documents;
the C API spec is US$245.00.  You may get a cheaper answer on comp.unix.aix,
of course.

may-be-worth-more-than-$245-to-weed-out-the-wrong-answers-though-ly y'rs
    - tim