From 4766f521ee183bf5cba66f0cdd88ec3f1d28d473 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 23 Jun 2007 17:04:37 +0000 Subject: Fix that FCGIs would leave log files open when asked to shut down by USR2 (closes #3028) [sebastian.kanthak/josh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7095 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/CHANGELOG | 2 ++ railties/lib/fcgi_handler.rb | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'railties') diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 72d9361962..9d96aa9e6e 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fix that FCGIs would leave log files open when asked to shut down by USR2 #3028 [sebastian.kanthak/josh] + * Fixed that dispatcher preparation callbacks only run once in production mode. Mock Routes.reload so that dispatcher preparation callback tests run. [Rick] * Fix syntax error in dispatcher than wrecked failsafe responses. #8625 [mtitorenko] diff --git a/railties/lib/fcgi_handler.rb b/railties/lib/fcgi_handler.rb index 85e5ca99b3..5bb26e4598 100644 --- a/railties/lib/fcgi_handler.rb +++ b/railties/lib/fcgi_handler.rb @@ -169,6 +169,11 @@ class RailsFCGIHandler dispatcher_log :info, "restarted" + # close resources as they won't be closed by + # the OS when using exec + logger.close rescue nil + RAILS_DEFAULT_LOGGER.close rescue nil + exec(command_line) end -- cgit v1.2.3