Date: Thu, 8 Jul 1999 16:38:28 -0500 From: Jonathan Lemon <jlemon@americantv.com> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: jwd@unx.sas.com, hackers@FreeBSD.ORG Subject: Re: Strange select/poll behaviour [EBADF inconsistancy] Message-ID: <19990708163828.36990@right.PCS> In-Reply-To: <199907082133.OAA43126@apollo.backplane.com>; from Matthew Dillon on Jul 07, 1999 at 02:33:19PM -0700 References: <199907082133.OAA43126@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jul 07, 1999 at 02:33:19PM -0700, Matthew Dillon wrote: > Not unless you want to blow up virtually every program that uses select!!! > > Passing an nd parameter that is greater then the current number of > descriptors is perfectly valid. It's setting a bit in the bitmask for > one of those descriptors that should return EBADF! 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990708163828.36990>