summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-07-04 16:30:59 -0700
committerEric Wong <normalperson@yhbt.net>2009-07-04 16:30:59 -0700
commitec70433f84664af0dff1336845ddd51f50a714a3 (patch)
tree5b57b79c2eea5557d23f9aea2b6935131b9e0ee0
parentff0fc020fe30798e52d96cc11b445c76d9822422 (diff)
-rw-r--r--lib/unicorn.rb10
1 files 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)