Date: Wed, 10 Apr 1996 18:28:52 +0930 (CST) From: Michael Smith <msmith@atrad.adelaide.edu.au> To: marc@bowtie.nl (Marc van Kempen) Cc: doc@freebsd.org Subject: Re: select question Message-ID: <199604100858.SAA22928@genesis.atrad.adelaide.edu.au> In-Reply-To: <199604100751.JAA13364@nietzsche.bowtie.nl> from "Marc van Kempen" at Apr 10, 96 09:51:04 am
index | next in thread | previous in thread | raw e-mail
Marc van Kempen stands accused of saying: > > You won't believe how many times I've read that select manpage and > would not interpret it the right way. The way it's phrased right now, > is open (obviously) to multiple interpretations. Would it be ok > to add a sentence to the manpage to clarify this? > > > Select() examines the I/O descriptor sets whose addresses are passed in > readfds, writefds, and exceptfds to see if some of their descriptors are > ready for reading, are ready for writing, or have an exceptional condi- > tion pending, respectively. The first nfds descriptors are checked in > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > each set; i.e., the descriptors from 0 through nfds-1 in the descriptor > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > sets are examined. On return, select() replaces the given descriptor > ^^^^^^^^^^^^^^^^^ > > would become: > > The first nfds descriptors are checked in each set; i.e. the descriptors > from 0 through nfds-1 in the descriptor sets are examined. So to have > the descriptor fd examined, make sure nfds is at least fd+1. > > If you think this is ok, could you commit it? > (you have commit rights, don't you?) I don't, but I've forwarded this to the -doc list, which contains people that do. > Many thanks for your answer, No sweat; it's one of the classic mistakes 8) > Marc van Kempen BowTie Technology -- ]] Mike Smith, Software Engineer msmith@atrad.adelaide.edu.au [[ ]] Genesis Software genesis@atrad.adelaide.edu.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control (ph/fax) +61-8-267-3039 [[ ]] Collector of old Unix hardware. "Where are your PEZ?" The Tick [[help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604100858.SAA22928>
