[ale] Select()

Pete Hardie pete.hardie at gmail.com
Mon Aug 16 15:34:08 EDT 2010


On Mon, Aug 16, 2010 at 15:23, Calvin Harrigan
<charriglists at bellsouth.net> wrote:
> I'm taking a long overdue plunge back into linux C programming.  While
> reading the man page for select(), I came across a line that has me a
> bit confused.
>
> http://linux.die.net/man/2/select
>
> "nfds is the highest-numbered file descriptor in any of the three sets,
> plus 1."
>
> What exactly are they referring to? What is highest-numbered file
> descriptor?  Are they referring to integer value stored in the file
> descriptor? Perhaps it's the number of file descriptors added to the
> set?  It's not very clear to me.  Any insight would be greatly appreciated.


It's probably been as  long or longer for me, but I believe it is the
index of the
largest set, +1 - so if you have 10 descriptors in each set, it's 11.
If one set is larger, use that value


-- 
Pete Hardie
--------
Better Living Through Bitmaps



More information about the Ale mailing list