From 4accf4449390c649bce0b1c9d84314d65fd41f8e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 10 Jun 2010 08:47:10 +0000 Subject: respect "working_directory" wrt config.ru Since we added support for the "working_directory" parameter, it often became unclear where/when certain paths would be bound. There are some extremely nasty dependencies and ordering issues when doing this. It's all pretty fragile, but works for now and we even have a full integration test to keep it working. I plan on cleaning this up 2.x.x to be less offensive to look at (Rainbows! and Zbatery are a bit tied to this at the moment). Thanks to Pierre Baillet for reporting this. ref: http://mid.gmane.org/AANLkTimKb7JARr_69nfVrJLvMZH3Gvs1o_KwZFLKfuxy@mail.gmail.com --- lib/unicorn/launcher.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/unicorn/launcher.rb') diff --git a/lib/unicorn/launcher.rb b/lib/unicorn/launcher.rb index 5ab04c7..7f3ffa6 100644 --- a/lib/unicorn/launcher.rb +++ b/lib/unicorn/launcher.rb @@ -56,8 +56,9 @@ class Unicorn::Launcher end end # $stderr/$stderr can/will be redirected separately in the Unicorn config - Unicorn::Configurator::DEFAULTS[:stderr_path] = "/dev/null" - Unicorn::Configurator::DEFAULTS[:stdout_path] = "/dev/null" + Unicorn::Configurator::DEFAULTS[:stderr_path] ||= "/dev/null" + Unicorn::Configurator::DEFAULTS[:stdout_path] ||= "/dev/null" + Unicorn::Configurator::RACKUP[:daemonized] = true end end -- cgit v1.2.3-24-ge0c7