如何在Erlang处理SIGINT? [英] How can I handle SIGINT in Erlang?
本文介绍了如何在Erlang处理SIGINT?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
你不能。由Erlang VM专门处理的操作系统信号。我猜,操作系统信号可以在驱动程序中处理,但是它可能会干扰VM信号处理程序,因此可以自行承担风险。
I know how to create custom signal handlers in Java, Python, Ruby, Perl, and Lisp, thanks to Google and a plethora of tutorials. I can't find online how to create handlers for SIGINT, SIGTERM, HUP, etc. in Erlang.
解决方案
You can not. OS signals handled exclusively by Erlang VM. I guess OS signals can be handled in a driver but it can interfere with the VM signal handler so use it on your own risk.
这篇关于如何在Erlang处理SIGINT?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文