:This is because initially, only 20 descriptors are allocated, and
:the system is quietly ignoring any descriptors over the allocated 
:amount:
:
:        if (uap->nd > p->p_fd->fd_nfiles)
:                uap->nd = p->p_fd->fd_nfiles;   /* forgiving; slightly wrong */
:
:This should be:
:
:        if (uap->nd > p->p_fd->fd_nfiles)
:               return (EBADF);
:
:--
:Jonathan

    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!

                                        -Matt
                                        Matthew Dillon 
                                        <dil...@backplane.com>



To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to