svn commit: r296109 - head/libexec/rlogind

Pedro Giffuni pfg at FreeBSD.org
Sat Feb 27 19:02:06 UTC 2016



On 02/27/16 13:38, Jilles Tjoelker wrote:
> 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.
>

Of course it pretty much depends on what you want to do. Yes, for 
something like talk we are fine with poll(). I also find poll()
more readable than the alternatives.

Pedro.


More information about the svn-src-all mailing list