1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/curses/rain.rb: trap SIGHUP, SIGINT, SIGQUIT and SIGTERM only.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2012-02-23 10:59:00 +00:00
parent 57e95f86be
commit a49fc9beb6
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Thu Feb 23 19:57:56 2012 Tanaka Akira <akr@fsij.org>
* ext/curses/rain.rb: trap SIGHUP, SIGINT, SIGQUIT and SIGTERM only.
Thu Feb 23 19:56:48 2012 Tanaka Akira <akr@fsij.org>
* signal.c (sig_trap): show signal name on error.

View file

@ -14,7 +14,7 @@ def ranf
end
# main #
for i in 1 .. 15 # SIGHUP .. SIGTERM
for i in %w[HUP INT QUIT TERM]
if trap(i, "SIG_IGN") != 0 then # 0 for SIG_IGN
trap(i) {|sig| onsig(sig) }
end