Created
July 2, 2014 13:50
-
-
Save zlx/508c6f2e0594790a648f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts Process.pid | |
trap(:INT) { print "Na na na, you can't get me" } | |
sleep # so that we have time to send it a signal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
重新定义了 INT 信号,你不能使用
来使进程退出。
但是你不能重新定义
SIGKILL
,SIGSTOP
信号