about summary refs log tree commit homepage
path: root/lib/unicorn.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicorn.rb')
-rw-r--r--lib/unicorn.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb
index a7b0646..cbb5520 100644
--- a/lib/unicorn.rb
+++ b/lib/unicorn.rb
@@ -312,6 +312,11 @@ module Unicorn
       if path
         if x = valid_pid?(path)
           return path if pid && path == pid && x == $$
+          if x == reexec_pid && pid =~ /\.oldbin\z/
+            logger.warn("will not set pid=#{path} while reexec-ed "\
+                        "child is running PID:#{x}")
+            return
+          end
           raise ArgumentError, "Already running on PID:#{x} " \
                                "(or pid=#{path} is stale)"
         end