about summary refs log tree commit homepage
path: root/lib/yahns/server.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2013-10-22 22:46:25 +0000
committerEric Wong <e@80x24.org>2013-10-22 23:08:46 +0000
commit28163a34ceff8334b2af4c5c30ec1e642efb9be1 (patch)
tree6219d20af729502cd20b942fb8700bffea741f16 /lib/yahns/server.rb
parentb79ba40ff559f9676c7bad530eeab6b7eb6a91f1 (diff)
downloadyahns-28163a34ceff8334b2af4c5c30ec1e642efb9be1.tar.gz
These can be used to disconnect/reconnect to databases
and other external connections.  These are named to match
the documentation of pthread_atfork(3)
Diffstat (limited to 'lib/yahns/server.rb')
-rw-r--r--lib/yahns/server.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/yahns/server.rb b/lib/yahns/server.rb
index 4663c36..5532666 100644
--- a/lib/yahns/server.rb
+++ b/lib/yahns/server.rb
@@ -8,6 +8,9 @@ class Yahns::Server # :nodoc:
   attr_accessor :daemon_pipe
   attr_accessor :logger
   attr_writer :worker_processes
+  attr_writer :worker_atfork_prepare
+  attr_writer :worker_atfork_parent
+  attr_writer :worker_atfork_child
   include Yahns::SocketHelper
 
   def initialize(config)
@@ -21,6 +24,7 @@ class Yahns::Server # :nodoc:
     @listeners = []
     @pid = nil
     @worker_processes = nil
+    @worker_atfork_prepare = @worker_atfork_parent = @worker_atfork_child = nil
     @user = nil
     @queues = []
     @wthr = []