public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] select () confusion
@ 2001-08-02 14:28 Trenton D. Adams
  2001-08-02 14:49 ` Jonathan Larmour
  0 siblings, 1 reply; 5+ messages in thread
From: Trenton D. Adams @ 2001-08-02 14:28 UTC (permalink / raw)
  To: 'eCos Discussion'

What does the following statement in the select () function
documentation mean?

n is the highest-numbered descriptor in any of the three sets, plus 1.

Does that mean I have to figure out what the highest numbered socket is
before calling select?

Anyhow, I thought that the first parameter was the number of file
descriptors in the fd_set.  It makes no sense to have to calculate what
the highest numbered socket descriptor is before calling select ().  On
top of that, the example at the bottom of the documentation for select
() is not very good.  It passes a 1 in as the first parameter which is
exactly why I thought it was the number of file descriptors and not the
highest numbered one.

Trenton D. Adams
Embedded Developer
Windows Developer
Extreme Engineering Ltd.
Calgary Alberta

Phone: 403 640 9494 ext 208
Fax:   403 640 9599



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-08-02 15:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-02 14:28 [ECOS] select () confusion Trenton D. Adams
2001-08-02 14:49 ` Jonathan Larmour
2001-08-02 14:55   ` Trenton D. Adams
2001-08-02 15:05     ` Jonathan Larmour
2001-08-02 15:30       ` Trenton D. Adams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).