erlang and sysfs_notify limitations

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

erlang and sysfs_notify limitations

Max Lapshin-2
Linux kernel has sysfs_notify mechanism.

This mechanism allow to switch from periodical reading (polling) /sys files to blocking epoll call.

userlevel application can open required /sys file and start waiting for events with blocking "poll" call.

Kernel driver will call sysfs_notify when something changes and user application will be able to read new data.

As far as I have understood, erlang right now cannot use this approach because this non-standard approach requires polling on regular files.

I have made an illustration for this problem: https://github.com/maxlapshin/erl_notify

Without adding it we cannot read gpio, temperature or mdraid events with new way.

Is it possible to add this way of polling local files (non-sockets) to erlang?

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions