Re: Change select(2) to kevent(2) on script(1)...

From: Maxim Sobolev <sobomax_at_FreeBSD.org>
Date: Mon, 22 Dec 2008 02:56:27 -0800
Norikatsu Shigemura wrote:
> Hi Ed!
> 
> 	I inspired by your 'kqueue()-support to pseudo-terminal master
> 	devices' (svn commit: r185942).  So I'm trying to use kevent(2)
> 	on script(1). (SEE ALSO following patch)

It's unrelated question, but I wonder what the reason to do this might 
be? AFAIK kqueue(2) provides performance benefit only for the cases when 
one needs to monitor large number of file descriptors. In this case 
there are just 2 descriptors. The kqueue(2) has big disadvantage of 
being non-POSIX, FreeBSD-specific interface, making it harder for 
somebody to adapt the code in non-FreeBSD environment. For this reason 
IMHO it should only be used for really performance critical code. For 
other cases select(2)/poll(2) should be the interface of choice.

-Maxim
Received on Mon Dec 22 2008 - 09:57:04 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:39 UTC