aboutsummaryrefslogtreecommitdiffstats
path: root/lib/un.rb
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-10 02:29:04 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-10 02:29:04 +0000
commit073ac4ff5a67570409056971578bb4294649f006 (patch)
tree8ce9fb0a8d831a01bdc6d7b57800b85724772385 /lib/un.rb
parent81f1c62e3e2cb437b390373f33610db08f464be3 (diff)
downloadruby-073ac4ff5a67570409056971578bb4294649f006.tar.gz
* lib/un.rb (httpd): SIGQUIT and SIGHUP are not guaranteed to exist.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/un.rb')
-rw-r--r--lib/un.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/un.rb b/lib/un.rb
index 1c52c2f469..3c1f3eca86 100644
--- a/lib/un.rb
+++ b/lib/un.rb
@@ -317,9 +317,9 @@ def httpd
s = WEBrick::HTTPServer.new(options)
shut = proc {s.shutdown}
Signal.trap("TERM", shut)
- Signal.trap("QUIT", shut)
+ Signal.trap("QUIT", shut) if Signal.list.has_key?("QUIT")
if STDIN.tty?
- Signal.trap("HUP", shut)
+ Signal.trap("HUP", shut) if Signal.list.has_key?("HUP")
Signal.trap("INT", shut)
end
s.start