[erlang-questions] Increase the handle limit

Rickard Green <>
Mon Oct 24 14:31:56 CEST 2011


Joel Reymont wrote:
> Rickard,
>
> I see no basis for your statement below.
>
> On Oct 24, 2011, at 12:52 PM, Rickard Green wrote:
>
>> The "clipping" is there for a reason. Kernel-poll on MacOSX is implemented using kqueue(). Neither kqueue() nor poll() can handle all types of file-descriptors on MacOSX. The runtime system needs to be able to handle any type of file-descriptor that may appear.
>
> Could this be old information that's no longer valid?
>
> I just looked at the documentation for kqueue and poll and saw no restrictions on the type of file descriptor being handled.
>
> Poll has no restrictions whatsoever and kqueue has slightly different notification behavior depending on descriptor type.
>
> 	Thanks, Joel

On our Lion machine:

$ uname -a
Darwin xxx 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug  9 20:54:00 PDT 
2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64

$ man kqueue
...
BUGS
      Not all filesystem types support kqueue-style notifications.  And 
even some that do, like some remote filesystems, may only support a 
subset of the notification semantics described here.

$ man poll
...
BUGS
      The poll() system call currently does not support devices.

There may of course always be improvements in future releases. We fall 
back on select() on MacOSX since our configure test for a poll() 
implementation that can handle devices fails. When poll() on MacOSX can 
handle devices, it will automatically be used as fallback instead of 
select().

-- 
Rickard Green, Erlang/OTP, Ericsson AB.



More information about the erlang-questions mailing list