svn commit: r187677 - head/sys/kern

Sam Leffler sam at
Sun Jan 25 11:57:40 PST 2009

Jeff Roberson wrote:
> Author: jeff
> Date: Sun Jan 25 07:24:34 2009
> New Revision: 187677
> URL:
> Log:
>   Fix errors introduced when I rewrote select.
>    - Restructure selscan() and selrescan() to avoid producing extra selfps
>      when we have a fd in multiple sets.  As described below multiple selfps
>      may still exist for other reasons.
>    - Make selrescan() tolerate multiple selfds for a given descriptor
>      set since sockets use two selinfos per fd.  If an event on each selinfo
>      fires selrescan() will see the descriptor twice.  This could result in
>      select() returning 2x the number of fds actually existing in fd sets.

Can you clarify what the erroneous behaviour is?  It appears the caller 
will receive nfds set to 2x the actual number of descriptors marked in 
the bit vectors?  Was this identified because an application 
failed/misbehaved?  If so, and the application is public please identify it.


More information about the svn-src-head mailing list