From 5c5cff9ab839b32d32f762eedc94ab39acde663c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 1 Apr 2009 11:28:51 -0700 Subject: Remove set_cloexec wrapper and require FD_CLOEXEC FD_CLOEXEC is POSIX and we only run on POSIX. Things will slowly leak over time if FD_CLOEXEC is not set, so raise the issue ASAP. --- lib/unicorn/socket.rb | 5 ----- 1 file changed, 5 deletions(-) (limited to 'lib/unicorn/socket.rb') diff --git a/lib/unicorn/socket.rb b/lib/unicorn/socket.rb index 4870133..0dba8cb 100644 --- a/lib/unicorn/socket.rb +++ b/lib/unicorn/socket.rb @@ -1,4 +1,3 @@ -require 'fcntl' require 'socket' require 'io/nonblock' @@ -48,10 +47,6 @@ module Unicorn sock.setsockopt(SOL_TCP, TCP_CORK, 1) if defined?(TCP_CORK) end - def set_cloexec(io) - io.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined?(Fcntl::FD_CLOEXEC) - end - def set_server_sockopt(sock) if defined?(TCP_DEFER_ACCEPT) sock.setsockopt(SOL_TCP, TCP_DEFER_ACCEPT, 1) rescue nil -- cgit v1.2.3-24-ge0c7