[Python-Dev] Pervasive socket failures on Windows

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Feb 11 01:14:23 CET 2006

Tim Peters wrote:
> [Martin v. Löwis]
> > In any case, POSIX makes it undefined what FD_SET does when the
> > socket is larger than FD_SETSIZE, and apparently clearly expects
> > an fd_set to be a bit mask.
> Yup -- although the people who designed the fdset macros to begin with
> didn't appear to have this assumption.

I don't agree. I rather think the entire purpose of
the fdset interface was simply to allow more than
32 items in the set (which the original select()
in BSD was limited to). The whole thing still seems
totally bitmask-oriented, down to the confusion between
set size and file descriptor number.

The MacOSX man page for select() (which seems fairly
closely BSD-based) even explicitly says "The descriptor
sets are stored as bit fields in arrays of integers."


More information about the Python-Dev mailing list