about summary refs log tree commit homepage
path: root/lib/yahns/daemon.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yahns/daemon.rb')
-rw-r--r--lib/yahns/daemon.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/yahns/daemon.rb b/lib/yahns/daemon.rb
index f6cdf47..fd93fd7 100644
--- a/lib/yahns/daemon.rb
+++ b/lib/yahns/daemon.rb
@@ -19,7 +19,11 @@ module Yahns::Daemon # :nodoc:
 
     # We only start a new process group if we're not being reexecuted
     # and inheriting file descriptors from our parent
-    unless ENV['YAHNS_FD']
+    if ENV['YAHNS_FD']
+      # if we're inheriting, need to ensure this remains true so
+      # SIGWINCH works when worker processes are in play
+      yahns_server.daemon_pipe = true
+    else
       # grandparent - reads pipe, exits when master is ready
       #  \_ parent  - exits immediately ASAP
       #      \_ yahns master - writes to pipe when ready