[erlang-questions] kpoll still using select

Sverker Eriksson <>
Thu Jul 9 16:54:30 CEST 2009


I wrote:
> You don't have to edit any system headers.
>
Incorrect. I see your point.
You patch FD_SETSIZE to make the bit-mask in fd_set larger and avoid 
memory overwrites by FD_SET and FD_CLR.

But that will give you even more dangerous semantics. A call to 
driver_select with a large fd that kernel poll does not support
will be silently accepted but you will never get any events from it.

What would be needed is a patch to erl_poll.c that checks fd against 
FD_SETSIZE before calling FD_SET or FD_CLR.

/Sverker, Erlang/OTP


More information about the erlang-questions mailing list