about summary refs log tree commit homepage
path: root/lib/unicorn.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-02-09 15:28:40 -0800
committerEric Wong <normalperson@yhbt.net>2009-02-09 19:52:21 -0800
commitdb6bf9ca6f2bb3afc1335ff1ff9baa28fab540e5 (patch)
treef3cba16880b19b1ebd1d04736b0092eac17ba3f5 /lib/unicorn.rb
parent101fb9ad1372e97ddf998c7fd677e352719c90e8 (diff)
downloadunicorn-db6bf9ca6f2bb3afc1335ff1ff9baa28fab540e5.tar.gz
We'll be using this flag with a pipe, too.
Diffstat (limited to 'lib/unicorn.rb')
-rw-r--r--lib/unicorn.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb
index 9c6aab7..02bf20a 100644
--- a/lib/unicorn.rb
+++ b/lib/unicorn.rb
@@ -265,9 +265,7 @@ module Unicorn
       %w(USR1 USR2 HUP).each { |sig| trap(sig, 'IGNORE') }
       @after_fork.call(self, worker_nr) if @after_fork
 
-      if defined?(Fcntl::FD_CLOEXEC)
-        @listeners.each { |s| s.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) }
-      end
+      @listeners.each { |sock| set_cloexec(sock) }
       nr_before = nr = 0
       client = nil
       alive = true