[erlang-questions] Using sigwait in linked driver causes erl_ddll:load to return {error, {open_error, -10}}

Rob Elsner <>
Sun Apr 19 17:35:38 CEST 2009


Serge,

> It is true that Erlang emulator doesn't have a good way of dealing with
> sub-millisecond timers.  I think Ulf Wigger touched on this topic in the
> list some time back.

I will have to find that email chain, to read it.  I haven't seen too
much on Erlang and timers, just little bits here and there.

> If you happen to be using a linux kernel 2.6.22 or later you can use a more
> fancy timer mechanism via timerfd syscall.  This can create a timer file
> descriptor that you can register with the emulator via driver_select call.
>  This timer will have microsecond precision.

That is a great idea.  I didn't know about the timerfd.  I will try
this approach first, since I'm out of ideas why calling sigwait makes
loading fail but commenting out only sigwait makes my driver load.

Thank you for the excellent suggestion, I knew someone out there would
have a different approach.  I'll post-back on here when I get that
working.

Rob



More information about the erlang-questions mailing list