about summary refs log tree commit homepage
path: root/lib/yahns/config.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yahns/config.rb')
-rw-r--r--lib/yahns/config.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/yahns/config.rb b/lib/yahns/config.rb
index 3f4bb90..bdd03d6 100644
--- a/lib/yahns/config.rb
+++ b/lib/yahns/config.rb
@@ -317,8 +317,8 @@ class Yahns::Config # :nodoc:
     if String === val
       # we've already bound working_directory by the time we get here
       val = File.open(File.expand_path(val), "a")
+      val.close_on_exec = val.sync = true
       val.binmode
-      val.sync = true
     else
       rt = %w(puts write flush).map(&:to_sym) # match Rack::Lint
       rt.all? { |m| val.respond_to?(m) } or raise ArgumentError,
@@ -335,7 +335,7 @@ class Yahns::Config # :nodoc:
         @set[key] = path = "/dev/null"
       end
       File.open(path, 'a') { |fp| io.reopen(fp) } if String === path
-      io.sync = true
+      io.close_on_exec = io.sync = true
     end
 
     [ :logger, :pid, :worker_processes ].each do |var|