about summary refs log tree commit homepage
path: root/lib/zbatery.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/zbatery.rb')
-rw-r--r--lib/zbatery.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/zbatery.rb b/lib/zbatery.rb
index fb05318..9704839 100644
--- a/lib/zbatery.rb
+++ b/lib/zbatery.rb
@@ -96,6 +96,13 @@ module Zbatery
       rescue => e # hopefully ignores errors on Win32...
         logger.error "failed to setup signal handler: #{e.message}"
       end
+
+      if ready_pipe
+        ready_pipe.syswrite($$.to_s)
+        ready_pipe.close rescue nil
+        self.ready_pipe = nil
+      end
+
       worker = Worker.new(0, DeadIO.new)
       before_fork.call(self, worker)
       worker_loop(worker) # runs forever