From owner-freebsd-hackers Thu Jul 8 14:49: 6 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from janus.syracuse.net (janus.syracuse.net [205.232.47.15]) by hub.freebsd.org (Postfix) with ESMTP id 0F766150B8 for ; Thu, 8 Jul 1999 14:48:59 -0700 (PDT) (envelope-from green@FreeBSD.org) Received: from localhost (green@localhost) by janus.syracuse.net (8.9.2/8.8.7) with ESMTP id RAA56531; Thu, 8 Jul 1999 17:48:47 -0400 (EDT) X-Authentication-Warning: janus.syracuse.net: green owned process doing -bs Date: Thu, 8 Jul 1999 17:48:47 -0400 (EDT) From: "Brian F. Feldman" X-Sender: green@janus.syracuse.net To: Matthew Dillon Cc: Jonathan Lemon , jwd@unx.sas.com, hackers@FreeBSD.org Subject: Re: Strange select/poll behaviour [EBADF inconsistancy] In-Reply-To: <199907082145.OAA43211@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 8 Jul 1999, Matthew Dillon wrote: > :Hmm, you're right. Arguably, it could return EINVAL. Actually, the > :man page documents this behavior, although it gets the 256 number wrong. > : > : If nfds is greater than the number of open files, select() is not guaran- > : teed to examine the unused file descriptors. For historical reasons, > : select() will always examine the first 256 descriptors. > : > :-- > :Jonathan > > This piece of the manual is justifying the fact that select() is not > currently checking past the current number of open files -- which > is how select() works now. The second part of that manual entry is just > plain wrong: If you pass an nd value less then 256 it will only check that > number of descriptors, it no longer examines a minimum of 256. So shouldn't someone correct it? I'll do it if noone else wants to. > > It would definitely not be appropriate to return EINVAL. I concur. > > -Matt > Matthew Dillon > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > Brian Fundakowski Feldman _ __ ___ ____ ___ ___ ___ green@FreeBSD.org _ __ ___ | _ ) __| \ FreeBSD: The Power to Serve! _ __ | _ \._ \ |) | http://www.FreeBSD.org/ _ |___/___/___/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message