diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-04-12 23:16:20 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-04-12 23:16:20 -0700 |
commit | dc60ca25aa72bcee0becc4cdebb1be67acc5b5b5 (patch) | |
tree | a54f23d9da3eaedb8966327bb395b70d64733510 | |
parent | 810ca7d5b0aca3c031af36512e1addf36a4b939a (diff) | |
download | unicorn-dc60ca25aa72bcee0becc4cdebb1be67acc5b5b5.tar.gz |
If someone changes ENV or umask in the master process (via before_fork or when loading the config), assume it was intentional and just preserve it across reexec.
-rw-r--r-- | lib/unicorn.rb | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 9a87e50..9ce7fc1 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -32,8 +32,6 @@ module Unicorn # symlink dirs are the default with Capistrano... :cwd => `/bin/sh -c pwd`.chomp("\n"), :zero => $0.dup, - :environ => {}.merge!(ENV), - :umask => File.umask, }.freeze Worker = Struct.new(:nr, :tempfile) unless defined?(Worker) @@ -338,10 +336,8 @@ module Unicorn end @reexec_pid = fork do - ENV.replace(@start_ctx[:environ]) listener_fds = @listeners.map { |sock| sock.fileno } ENV['UNICORN_FD'] = listener_fds.join(',') - File.umask(@start_ctx[:umask]) Dir.chdir(@start_ctx[:cwd]) cmd = [ @start_ctx[:zero] ] + @start_ctx[:argv] |