summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-07-13 08:53:48 +0000
committerEric Wong <normalperson@yhbt.net>2010-07-13 18:31:53 +0000
commitae1f5e2d331d1714dd1b71d4905b296abf7780d0 (patch)
treeb06fba3243e5041d51bbfb6b85ccea415622cac2
parentaad1fdfc17e2fe1a6308690daf74456877796f51 (diff)
This was accidentally enabled when ready_pipe was developed.
While re-daemonizing appears harmless in most cases this makes
detecting backed-out upgrades from the original master process
impossible.
(cherry picked from commit 3f0f9d6d72cf17b34c130b86eb933bbc513b24b3)
-rw-r--r--lib/unicorn/launcher.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/unicorn/launcher.rb b/lib/unicorn/launcher.rb
index 0d957cf..0d415dd 100644
--- a/lib/unicorn/launcher.rb
+++ b/lib/unicorn/launcher.rb
@@ -24,11 +24,7 @@ module Unicorn::Launcher
 
     # We only start a new process group if we're not being reexecuted
     # and inheriting file descriptors from our parent
-    if ENV['UNICORN_FD']
-      exit if fork
-      Process.setsid
-      exit if fork
-    else
+    unless ENV['UNICORN_FD']
       # grandparent - reads pipe, exits when master is ready
       #  \_ parent  - exits immediately ASAP
       #      \_ unicorn master - writes to pipe when ready