about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-09-02 01:09:45 -0700
committerEric Wong <normalperson@yhbt.net>2009-09-02 19:43:48 -0700
commit7f74a16406c92c4362ac20af4ccb8bc821cf978b (patch)
tree87765fbd2ab22f87324b7ba25f4c225f29935269
parente671000b5b3729ff5c6f9efdb313e599ae5ebee7 (diff)
downloadunicorn-7f74a16406c92c4362ac20af4ccb8bc821cf978b.tar.gz
Otherwise errors in the Unicorn-specific config files can get
error messages swallowed up when daemonizing.
-rw-r--r--lib/unicorn/launcher.rb4
1 files 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