diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-03-04 11:11:44 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-03-04 11:11:44 -0800 |
commit | 551789f8619b567333bbf41020323f4e1624841c (patch) | |
tree | 0785474d929b9708b0f76916c5b8e582a0fefcfd /lib/unicorn.rb | |
parent | b9db429c2bac961f8ef040d3dc2061ab14a94a5b (diff) | |
download | unicorn-551789f8619b567333bbf41020323f4e1624841c.tar.gz |
Unicorn will always continue to run in the directory it started in, it does not chdir to "/". Since the default start_ctx[:cwd] is symlink-aware, this should not be a problem for Capistrano-deployed applications.
Diffstat (limited to 'lib/unicorn.rb')
-rw-r--r-- | lib/unicorn.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 8754610..0727456 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -131,13 +131,6 @@ module Unicorn @pid = path end - # sets the path for running the master and worker process, useful for - # running and reexecuting from a symlinked path like Capistrano allows - def directory=(path) - Dir.chdir(path) if path - @directory = path - end - # add a given address to the +listeners+ set, idempotently # Allows workers to add a private, per-process listener via the # @after_fork hook. Very useful for debugging and testing. @@ -331,7 +324,7 @@ module Unicorn ENV.replace(@start_ctx[:environ]) ENV['UNICORN_FD'] = @listeners.map { |sock| sock.fileno }.join(',') File.umask(@start_ctx[:umask]) - Dir.chdir(@directory || @start_ctx[:cwd]) + Dir.chdir(@start_ctx[:cwd]) cmd = [ @start_ctx[:zero] ] + @start_ctx[:argv] logger.info "executing #{cmd.inspect} (in #{Dir.pwd})" exec(*cmd) |