On Fri, 6 Jul 2001, Matthew Hagerty wrote:
> I take this to mean that each descriptor set contains n descriptors and I
> am interested in examining the first nfds descriptors referenced in my
> sets. I also understood it to mean that nfds has absolutely nothing to do
> with the actual *value* of a descriptor, i.e. the value returned by
> fopen(), socket(), etc.. Is this correct thinking? What got me
> second-guessing myself was a use of select() that seems to indicate that
> you have to make sure nfds is larger than the value of the largest
Correct.
<snip>
> Any clarification on how nfds should be set would be greatly appreciated.
Just like you said:
"you have to make sure nfds is larger than the value of the largest
filedescriptor".
Reason being: kernel has to know how large is the mask passed to it, and
how far does it need to look.
-alex