Email List: Xaustin-group-lX
[All Lists]

RE: select issue

To: "'Garrett Wollman'" <yyyyyyy@xxxxxxxxxxxxxxxxxxxxx>, "'yyyyyyyyyyyyyy@xxxxxxxxxxxxx'" <yyyyyyyyyyyyyy@xxxxxxxxxxxxx>
Subject: RE: select issue
From: "Green, Paul" <yyyyyyyyyy@xxxxxxxxxxx>
Date: Tue, 25 May 2004 21:13:31 -0400
Cc: "'yyyyyyyyyyyyyy@xxxxxxxxxxxxx'" <yyyyyyyyyyyyyy@xxxxxxxxxxxxx>
Garrett Wollman [mailto:yyyyyyy@xxxxxxxxxxxxxxxxxxxxx] wrote:
> <<On Fri, 21 May 2004 12:13:14 -0400, "Green, Paul" 
> <yyyyyyyyyy@xxxxxxxxxxx> said:
> 
> > What does the phrase "all bits" mean?  Does it mean the "first nfds 
> > bits" or does it mean "all bits"?
> 
> The traditional implementation permits applications to 
> redefine the macro FD_SETSIZE before including any of the 
> headers that may cause the fd_set type to be defined, to 
> indicate the maximum number of file descriptors the 
> application may want to access.  Therefore, those 
> implementations cannot access more than ROUNDUP(nfds, sizeof
> base_type_of_fd_set) bits.

Thanks, Garrett, for your cogent response.  I concur with your descripption
of how traditional implementations handle select.

I'd still like to see the language of the POSIX.1 definition of the select()
function clarified to indicate that only the first nfds bits are to be
referenced or cleared.  I consider the current language to be a trap for the
unwary.  A trap that I have to admit I fell into headfirst.

Thanks
PG
--
Paul Green, Senior Technical Consultant,
Stratus Technologies, Maynard, MA USA
Voice: +1 978-461-7557; FAX: +1 978-461-3610
 

<Prev in Thread] Current Thread [Next in Thread>