about summary refs log tree commit homepage
path: root/lib/unicorn.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicorn.rb')
-rw-r--r--lib/unicorn.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb
index cbbb283..3bdbb3a 100644
--- a/lib/unicorn.rb
+++ b/lib/unicorn.rb
@@ -1,4 +1,5 @@
 require 'logger'
+require 'fcntl'
 
 require 'unicorn/socket'
 require 'unicorn/const'
@@ -425,7 +426,7 @@ module Unicorn
       @workers.clear
       @start_ctx.clear
       @start_ctx = @workers = @rd_sig = @wr_sig = nil
-      @listeners.each { |sock| set_cloexec(sock) }
+      @listeners.each { |sock| sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) }
       ENV.delete('UNICORN_FD')
       @after_fork.call(self, worker.nr) if @after_fork
       @request = HttpRequest.new(logger)