about summary refs log tree commit homepage
path: root/lib/unicorn
diff options
context:
space:
mode:
authorEric Wong <BOFH@YHBT.net>2023-06-05 10:12:51 +0000
committerEric Wong <bofh@yhbt.net>2023-06-05 10:39:04 +0000
commit835ec74c244611cbf27774ac42454f1149d61250 (patch)
treef756c5316bb9525ff6111c1db44fee1340c7a480 /lib/unicorn
parent3d1b6c1f611604d35b421bd903a316934efc04ef (diff)
downloadunicorn-835ec74c244611cbf27774ac42454f1149d61250.tar.gz
Passing the `{ FD => IO }' mapping to #spawn or #exec already
ensures Ruby will clear FD_CLOEXEC on these FDs before execve(2).
Diffstat (limited to 'lib/unicorn')
-rw-r--r--lib/unicorn/http_server.rb5
1 files changed, 1 insertions, 4 deletions
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