Skip to content

Instantly share code, notes, and snippets.

@zlx
Created July 2, 2014 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zlx/508c6f2e0594790a648f to your computer and use it in GitHub Desktop.
Save zlx/508c6f2e0594790a648f to your computer and use it in GitHub Desktop.
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
@zlx
Copy link
Author

zlx commented Jul 2, 2014

重新定义了 INT 信号,你不能使用

Process.kill(:INT, <pid of first session>)

来使进程退出。

但是你不能重新定义 SIGKILL, SIGSTOP 信号

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment