Date: Thu, 8 Jul 1999 14:45:36 -0700 (PDT) From: Matthew Dillon <dillon@apollo.backplane.com> To: Jonathan Lemon <jlemon@americantv.com> Cc: jwd@unx.sas.com, hackers@FreeBSD.ORG Subject: Re: Strange select/poll behaviour [EBADF inconsistancy] Message-ID: <199907082145.OAA43211@apollo.backplane.com> References: <199907082133.OAA43126@apollo.backplane.com> <19990708163828.36990@right.PCS>
next in thread | previous in thread | raw e-mail | index | archive | help
: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. It would definitely not be appropriate to return EINVAL. -Matt Matthew Dillon <dillon@backplane.com> 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?199907082145.OAA43211>