[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Select()
- Subject: [ale] Select()
- From: charriglists at bellsouth.net (Calvin Harrigan)
- Date: Mon, 16 Aug 2010 16:36:58 -0400
- In-reply-to: <1281988316.27064.64.camel@cfowler-desktop>
- References: <[email protected]> <1281988316.27064.64.camel@cfowler-desktop>
On 8/16/2010 3:51 PM, Chris Fowler wrote:
> That is the highest number of FD you want to select on.
>
> If you want to select on 0 (STDIN) and 1 (STDOUT) then MAXFD needs to be
> 1 (highest FD) + 1 = 2. MAXFD needs to be 2. That will allow you to
> select on 0 and 1.
So I should be monitoring the values of the file descriptors returned to
determine which one is the highest then add 1?
This is what I'm understanding the more I follow this trail.
http://www.linuxmanpages.com/man2/select_tut.2.php