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/lib/fcgi_handler.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'railties/lib/fcgi_handler.rb') 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