about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-09-30 13:41:28 -0700
committerEric Wong <normalperson@yhbt.net>2009-09-30 14:03:03 -0700
commitf3f43f1b6c3930525a892c8ce860f072184fe981 (patch)
treeeb62c6a680bb585b43ece6be2e87d70c54145823
parent407724b49069ee539e9a918ce75e9d1290552471 (diff)
downloadunicorn-f3f43f1b6c3930525a892c8ce860f072184fe981.tar.gz
I'd rather document and maintain a stable interface for the
Worker class than to have to deal with potential (portability
and security) issues with with supporting user privilege
management right now.

There's already an example of user/group-switching support in
the after_fork() hook and the error handling involved may be
different depending on the application and environment so I
remain hesitant to add official support for it...
-rw-r--r--lib/unicorn.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb
index 4171d3f..86458ac 100644
--- a/lib/unicorn.rb
+++ b/lib/unicorn.rb
@@ -61,7 +61,13 @@ module Unicorn
       0 => $0.dup,
     }
 
+    # This class and its members can be considered a stable interface
+    # and will not change in a backwards-incompatible fashion between
+    # releases of Unicorn.  You may need to access it in the
+    # before_fork/after_fork hooks.  See the Unicorn::Configurator RDoc
+    # for examples.
     class Worker < Struct.new(:nr, :tmp)
+
       # worker objects may be compared to just plain numbers
       def ==(other_nr)
         self.nr == other_nr