From 78fb61a1fa3403bcaf616c5794f2ef764db3fd66 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 13 Nov 2007 00:54:57 +0000 Subject: [PATCH] FastCGI handler ignores unsupported signals like USR2 on Windows [Grzegorz Derebecki] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8132 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/CHANGELOG | 2 ++ railties/lib/fcgi_handler.rb | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/railties/CHANGELOG b/railties/CHANGELOG index c3817d3d638..87805fd1e7e 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* FastCGI handler ignores unsupported signals like USR2 on Windows. [Grzegorz Derebecki] + * Only load ActionMailer::TestCase if ActionMailer is loaded. Closes #10137 [defunkt] * Fixed that db:reset would use migrations instead of loading db/schema.rb [DHH] diff --git a/railties/lib/fcgi_handler.rb b/railties/lib/fcgi_handler.rb index 2b0d7b19167..a644161e7fb 100644 --- a/railties/lib/fcgi_handler.rb +++ b/railties/lib/fcgi_handler.rb @@ -133,7 +133,12 @@ class RailsFCGIHandler def install_signal_handler(signal, handler = nil) if SIGNALS.include?(signal) && self.class.method_defined?(name = "#{SIGNALS[signal]}_handler") handler ||= method(name).to_proc - trap(signal, handler) + + begin + trap(signal, handler) + rescue ArgumentError + dispatcher_log :warn, "Ignoring unsupported signal #{signal}." + end else dispatcher_log :warn, "Ignoring unsupported signal #{signal}." end