[erlang-patches] [erlang-bugs] Lift limitation to FD_SETSIZE file descriptors on Mac OS X in erl_poll

Sverker Eriksson sverker.eriksson@REDACTED
Wed May 29 11:43:44 CEST 2013


Fredrik wrote:
> On 05/12/2013 05:36 PM, Anthony Ramine wrote:
>> Hello,
>>
>> I've written a patch that makes erl_poll uses 
>> _DARWIN_UNLIMITED_SELECT on Mac OS X. This constant makes select() 
>> work with more than FD_SETSIZE file descriptors, all that is needed 
>> is to manually manage the fd_set values.
>>
>> I've run port_SUITE.iter_max_ports test case and got a maximum of 
>> 2422 ports instead of 502 before.
>>
>> Cc'ing Joel Reymont and Max Lapshin because I know they both 
>> encountered that problem.
>>
>>     git fetch https://github.com/nox/otp.git darwin-unlimited-select
>>
>>     https://github.com/nox/otp/compare/erlang:maint...darwin-unlimited-select 
>>
>>     https://github.com/nox/otp/compare/erlang:maint...darwin-unlimited-select.patch 
>>
>>
>> Regards,
>>
> Hello Anthony,
> I've fetched your branch and it is now located in the 'pu' branch.
> Thanks,
>
I've reviewed this patch and it looks promising.

I did two more commit on top of your. One little bug-fix and a larger 
refactoring commit trying to reduce the number of #ifdef's and isolate 
the "dynamic fd_set" logic.

git fetch git://github.com/sverker/otp.git sverk/darwin-unlimited-select

/Sverker



More information about the erlang-patches mailing list