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 | |
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')
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/fcgi_handler.rb | 5 |
2 files changed, 7 insertions, 0 deletions
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 |