about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-11-01 19:50:09 +0000
committerEric Wong <normalperson@yhbt.net>2009-11-01 11:56:57 -0800
commit66a99327d91e3dd1974e615aa985759f984c5c64 (patch)
tree336f3ca3cfbdce4cee9bd22e56bc167154fd873c
parent9326f16c7d6ae6b60bbc42a171f8c6b70c61bc4f (diff)
downloadunicorn-66a99327d91e3dd1974e615aa985759f984c5c64.tar.gz
Even if START_CTX[:cwd] is pointing to another directory,
avoid overriding the user's decision to Dir.chdir if they
do it in either the Unicorn config file or the config.ru.
-rw-r--r--lib/unicorn.rb7
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb
index 8e3bf32..94be9d2 100644
--- a/lib/unicorn.rb
+++ b/lib/unicorn.rb
@@ -490,13 +490,6 @@ module Unicorn
     def spawn_missing_workers
       (0...worker_processes).each do |worker_nr|
         WORKERS.values.include?(worker_nr) and next
-        begin
-          Dir.chdir(START_CTX[:cwd])
-        rescue Errno::ENOENT => err
-          logger.fatal "#{err.inspect} (#{START_CTX[:cwd]})"
-          SIG_QUEUE << :QUIT # forcibly emulate SIGQUIT
-          return
-        end
         worker = Worker.new(worker_nr, Unicorn::Util.tmpio)
         before_fork.call(self, worker)
         WORKERS[fork { worker_loop(worker) }] = worker