about 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 09:11:55 +0000
commit430c8cc9f8b5f1db9395531df4ebab655da5d958 (patch)
tree1f9edae488d89f21870cc182b154cd227d0f9137
parenta055dcd9e15ed93c9bbd0d83b2f87c96a4733cfb (diff)
downloadunicorn-430c8cc9f8b5f1db9395531df4ebab655da5d958.tar.gz
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