about summary refs log tree commit homepage
path: root/lib/yahns/server_mp.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2013-10-30 21:05:21 +0000
committerEric Wong <normalperson@yhbt.net>2013-10-31 05:04:35 +0000
commit5544418af3fb810ef90f33bcf88a434cd0349dc8 (patch)
tree31ccc85fac7a73c47ddb7c051bd6d2e4f74f7584 /lib/yahns/server_mp.rb
parentd58bbc251d5b91ede5af220f17bc0359789370d3 (diff)
downloadyahns-5544418af3fb810ef90f33bcf88a434cd0349dc8.tar.gz
It was totally unnecessary and just made things hard-to-follow.
Diffstat (limited to 'lib/yahns/server_mp.rb')
-rw-r--r--lib/yahns/server_mp.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/yahns/server_mp.rb b/lib/yahns/server_mp.rb
index 4957c22..8272a9e 100644
--- a/lib/yahns/server_mp.rb
+++ b/lib/yahns/server_mp.rb
@@ -48,8 +48,8 @@ module Yahns::ServerMP # :nodoc:
     @sev = Yahns::Sigevent.new
     switch_user(*@user) if @user
     @user = @workers = nil
-    @worker_atfork_child.each(&:call) if @worker_atfork_child
-    @worker_atfork_child = @worker_atfork_parent = @worker_atfork_prepare = nil
+    @atfork_child.each(&:call) if @atfork_child
+    @atfork_child = @atfork_parent = @atfork_prepare = nil
   end
 
   def spawn_missing_workers
@@ -58,11 +58,11 @@ module Yahns::ServerMP # :nodoc:
       @workers.value?(worker_nr) and next
       worker = Yahns::Worker.new(worker_nr)
       @logger.info("worker=#{worker_nr} spawning...")
-      @worker_atfork_prepare.each(&:call) if @worker_atfork_parent
+      @atfork_prepare.each(&:call) if @atfork_parent
       if pid = fork
         @workers[pid] = worker.atfork_parent
         # XXX is this useful?
-        @worker_atfork_parent.each(&:call) if @worker_atfork_parent
+        @atfork_parent.each(&:call) if @atfork_parent
       else
         worker_atfork_internal(worker)
         run_mp_worker(worker)