From 7f74a16406c92c4362ac20af4ccb8bc821cf978b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 2 Sep 2009 01:09:45 -0700 Subject: launcher: defer daemonized redirects until config is read Otherwise errors in the Unicorn-specific config files can get error messages swallowed up when daemonizing. --- lib/unicorn/launcher.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/unicorn/launcher.rb b/lib/unicorn/launcher.rb index 8c96059..5ebc271 100644 --- a/lib/unicorn/launcher.rb +++ b/lib/unicorn/launcher.rb @@ -24,8 +24,8 @@ class Unicorn::Launcher exit if fork # $stderr/$stderr can/will be redirected separately in the Unicorn config - $stdout.reopen("/dev/null", "a") - $stderr.reopen("/dev/null", "a") + Unicorn::Configurator::DEFAULTS[:stderr_path] = "/dev/null" + Unicorn::Configurator::DEFAULTS[:stdout_path] = "/dev/null" end $stdin.sync = $stdout.sync = $stderr.sync = true end -- cgit v1.2.3-24-ge0c7