linux - Erlang Linux 信号处理

标签 linux erlang signals

是否可以通过 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/

相关文章:

linux - jack_connect MIDI (Alsa) 端口

linux - 我怎样才能获得 ubuntu linux 的本地主机 IP

java - 如何只处理 erlang 队列中的最新消息?

testing - 如何在 elixir 中为 escript 项目编写 ExUnit 测试用例

linux - bash 脚本 : if use with (conditon) or [condition]

c - 彼得森算法的错误

Erlang Supervisor重新启动间隔

python - 如何使用从外部脚本调用的回调发送信号?

c++ - 在 unix 中使用信号同步进程

c - 错误条件已修复,仍然在 C 中获取 SIGSEGV