From 835ec74c244611cbf27774ac42454f1149d61250 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 5 Jun 2023 10:12:51 +0000 Subject: drop redundant IO#close_on_exec=false calls Passing the `{ FD => IO }' mapping to #spawn or #exec already ensures Ruby will clear FD_CLOEXEC on these FDs before execve(2). --- lib/unicorn/http_server.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/unicorn') diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb index 348e745..dd92b38 100644 --- a/lib/unicorn/http_server.rb +++ b/lib/unicorn/http_server.rb @@ -472,10 +472,7 @@ class Unicorn::HttpServer def listener_sockets listener_fds = {} - LISTENERS.each do |sock| - sock.close_on_exec = false - listener_fds[sock.fileno] = sock - end + LISTENERS.each { |sock| listener_fds[sock.fileno] = sock } listener_fds end -- cgit v1.2.3-24-ge0c7