> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Dilkie, Lee
> > This is a non-issue; they are two different ways of saying > > the same thing. > > The AIX description is the same one all Unix systems with > > select() have used > > since... 4.2BSD. I don't recall if 4.1 had select() or not. > > > > Think about it. The fdset is a bit field. The nfds parameter > > tells select how > > far into the field it needs to look. Each bit corresponds to > > one fd. If you > > have fd#0, that corresponds to bit #1. This is why the number > > of fds is > > *always* the highest numbered fd +1. > > They are *not* the same thing. Wrong. > I may have only one fd with a value of 100. IBM's select asks > that nfdsmsgs (the first parameter) be set to 1. (kind like poll) Wrong. > Linux/BSD requires it be set to 101. > > Not all implementations of fd_set's and hence select() use > bit arrays (win32 does not either but it ignores the first > parameter of select). The man page on the referenced URL states that the fdset is a bitmask. Please re-read the documentation: http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/libs/basetrf2/select. htm#HDRA15691187 Quoting from the above page: Nfdsmsgs Specifies the number of file descriptors and the number of message queues to check. The low-order 16 bits give the length of a bit mask that specifies which file descriptors to check; the high-order 16 bits give the size of an array that contains message queue identifiers. If either half of the Nfdsmsgs parameter is equal to a value of 0, the corresponding bit mask or array is assumed not to be present. The Nfds parameter is the length of the bitmask. This is exactly the same definition as on BSD. Changing this definition would totally break compatibility with all Unix networking software written to date. They're not that stupid. > And the behaviour of select() is not consistant across > implementations either. Linux has a different behaviour from > the "standard" BSD/UNIX/win32. Just ask anyone who's tried to > code select for a non-blocking socket connect.... Linux was never originally intended to be Just Like Unix. It has been forced into that direction by later generations of hackers, but some of its early design decisions remain to this day. So it goes. As someone once said, "Those who don't understand Unix are doomed to reimplement it, badly." -- Howard Chu Chief Architect, Symas Corp. Director, Highland Sun http://www.symas.com http://highlandsun.com/hyc Symas: Premier OpenSource Development and Support ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]