about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/unicorn.rb16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb
index cbbbe32..d2a18fb 100644
--- a/lib/unicorn.rb
+++ b/lib/unicorn.rb
@@ -25,11 +25,23 @@ module Unicorn
     attr_reader :logger
     include ::Unicorn::SocketHelper
 
-    IO_PURGATORY = [] # prevents IO objects in here from being GC-ed
-    SIG_QUEUE = []
+    # prevents IO objects in here from being GC-ed
+    IO_PURGATORY = []
+
+    # all bound listener sockets
     LISTENERS = []
+
+    # This hash maps PIDs to Workers
     WORKERS = {}
+
+    # See: http://cr.yp.to/docs/selfpipe.html
     SELF_PIPE = []
+
+    # signal queue used for self-piping
+    SIG_QUEUE = []
+
+    # We populate this at startup so we can figure out how to reexecute
+    # and upgrade the currently running instance of Unicorn
     START_CTX = {
       :argv => ARGV.map { |arg| arg.dup },
       # don't rely on Dir.pwd here since it's not symlink-aware, and