是否可以通过 Erlang 中的处理程序捕获 Linux 信号(例如 SIGUSR1)? (无需求助于用 C 编写的驱动程序)
最佳答案
(不是真正的答案)
2001 年有人问:
Does anyone have any examples of unix signal handling in erlang. I would like to make a loadbalancer that I have written respond to sighup.
当时的答案是:
There is no provision for handling signals in Erlang "itself", i.e. you will need to use a driver - or a port program of course, might actually be a better idea. Also for the driver case, the emulator has its own handler for a number of signals, and interfering with that will probably have "interesting" results - but SIGHUP should be OK I believe.
来源:http://www.erlang.org/pipermail/erlang-questions/2001-October/003752.html
据我所知,从那以后没有任何改变。但这非常有趣。如果有人对此有任何消息,请告诉我们:)
关于linux - Erlang Linux 信号处理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2459672/