From ae1f5e2d331d1714dd1b71d4905b296abf7780d0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 13 Jul 2010 08:53:48 +0000 Subject: launcher: do not re-daemonize when USR2 upgrading 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) --- lib/unicorn/launcher.rb | 6 +----- 1 file changed, 1 insertion(+), 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 -- cgit v1.2.3-24-ge0c7