From f34618e64b254f7792b476acf2e7eb426aa551a2 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 13 Apr 2009 11:46:14 -0700 Subject: Expose worker to {before,after}_fork hooks Instead of just worker.nr. This is a configuration file/API change and will break existing configurations. This allows worker.tempfile to be exposed to the hooks so ownership changes can still happen on it. On the other hand, I don't know of many people actually using this feature (or Unicorn). --- test/unit/test_signals.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/unit/test_signals.rb') diff --git a/test/unit/test_signals.rb b/test/unit/test_signals.rb index 45de263..bedce01 100644 --- a/test/unit/test_signals.rb +++ b/test/unit/test_signals.rb @@ -30,7 +30,7 @@ class SignalsTest < Test::Unit::TestCase tmp.chmod(0) @server_opts = { :listeners => [ "127.0.0.1:#@port", @tmp.path ], - :after_fork => lambda { |server,worker_nr| + :after_fork => lambda { |server,worker| trap(:HUP) { tmp.chmod(n += 1) } }, } -- cgit v1.2.3-24-ge0c7