svn commit: r296109 - head/libexec/rlogind

Jilles Tjoelker jilles at stack.nl
Sat Feb 27 18:38:45 UTC 2016


On Sat, Feb 27, 2016 at 09:48:05AM -0500, Pedro Giffuni wrote:
> In the case of rlogind, note that the above limitation [FD_SETSIZE]
> has disappeared by using poll(2).

> I will add that FreeBSD has a native poll(2) implementation, it is
> not a wrapper around select as some old postings would suggest.

> I don't have any plans to do a massive shakeup against select(2), this
> was some lower hanging fruit that was easy to change. For new code
> kqueue(2) should be preferred.

The FD_SETSIZE can be a more important issue in library code which may
be called from applications that have many descriptors open already.

I don't agree with always using kqueue(2) for new code. Provided poll(2)
has the necessary functionality and the number of file descriptors is
low, using poll(2) tends to result in simpler code and better
performance. Also, poll(2) is more portable and avoids a failure mode
from the kqueues rlimit.

-- 
Jilles Tjoelker


More information about the svn-src-head mailing list