From ec70433f84664af0dff1336845ddd51f50a714a3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 4 Jul 2009 16:30:59 -0700 Subject: Minor cleanups to core --- lib/unicorn.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 26b0fbd..dac0b4f 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -63,7 +63,7 @@ module Unicorn # don't rely on Dir.pwd here since it's not symlink-aware, and # symlink dirs are the default with Capistrano... :cwd => `/bin/sh -c pwd`.chomp("\n"), - :zero => $0.dup, + 0 => $0.dup, } class Worker < Struct.new(:nr, :tempfile) @@ -372,7 +372,7 @@ module Unicorn listener_fds = LISTENERS.map { |sock| sock.fileno } ENV['UNICORN_FD'] = listener_fds.join(',') Dir.chdir(START_CTX[:cwd]) - cmd = [ START_CTX[:zero] ] + START_CTX[:argv] + cmd = [ START_CTX[0] ].concat(START_CTX[:argv]) # avoid leaking FDs we don't know about, but let before_exec # unset FD_CLOEXEC, if anything else in the app eventually @@ -475,7 +475,7 @@ module Unicorn # traps for USR1, USR2, and HUP may be set in the after_fork Proc # by the user. def init_worker_process(worker) - QUEUE_SIGS.each { |sig| trap(sig, 'IGNORE') } + QUEUE_SIGS.each { |sig| trap(sig, nil) } trap(:CHLD, 'DEFAULT') SIG_QUEUE.clear proc_name "worker[#{worker.nr}]" @@ -630,8 +630,8 @@ module Unicorn end def proc_name(tag) - $0 = ([ File.basename(START_CTX[:zero]), tag ] + - START_CTX[:argv]).join(' ') + $0 = ([ File.basename(START_CTX[0]), tag + ]).concat(START_CTX[:argv]).join(' ') end def redirect_io(io, path) -- cgit v1.2.3-24-ge0c7