: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 <dil...@backplane.com> To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message