[erlang-questions] max fds for epoll incorrectly reduced to FD_SETSIZE

Steve Vinoski vinoski@REDACTED
Mon Feb 23 17:41:07 CET 2009

On 2/23/09, Bjorn Gustavsson <bgustavsson@REDACTED> wrote:
> On Sat, Feb 21, 2009 at 8:16 PM, Steve Vinoski <vinoski@REDACTED> wrote:
>  > Since kernel poll is not on by default, select() is used as the
>  > fallback/default, and the following code from the erts_poll_init()
>  > function in erts/emulator/sys/common/erl_poll.c limits the max fds to
> Are you sure that select() is used as a fallback on Linux? On systems that have
>  a poll() that works for any type of file descriptor, poll() is supposed to be
>  used. (On Mac OS X, poll() does not work for devices, so we are forced to use
>  select() as a fallback.)

Hi Bjorn, thanks for your response, and yes, that's a very good
question. I went back and thoroughly checked my normal Erlang builds
on Linux and sure enough, poll() is in effect. The build causing the
trouble I described in my original post is a slight cross-compilation
(i.e., compiling on one Linux/gcc combo for a different Linux/gcc
combo), so I suspect what might be happening is that the C code used
to determine whether poll works or not, which I just found thanks to
your question, is failing because of the cross-compile. I'll dig into
this theory further and let you know. I appreciate the pointer.


More information about the erlang-questions mailing list