diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-06-23 17:04:37 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-06-23 17:04:37 +0000 |
commit | 4766f521ee183bf5cba66f0cdd88ec3f1d28d473 (patch) | |
tree | 73715e782ea5344ac693c24194ef7de5d1cc6efc /railties/lib | |
parent | 279113f9b31ba6f08ba2489f5f033d269b94f829 (diff) | |
download | rails-4766f521ee183bf5cba66f0cdd88ec3f1d28d473.tar.gz rails-4766f521ee183bf5cba66f0cdd88ec3f1d28d473.tar.bz2 rails-4766f521ee183bf5cba66f0cdd88ec3f1d28d473.zip |
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
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/fcgi_handler.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 |