From 499d42c808347a598dabe8e7922778df29339f15 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 16 Aug 2009 17:18:09 -0700 Subject: app/inetd: explicitly close pipe descriptors on CatBody#close Since Rack permits body objects to have #close called on them, we can safely close our pipe readers immediately instead of waiting on the GC to close them (like we do for TeeInput tempfiles). --- lib/unicorn/app/inetd.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/unicorn/app/inetd.rb b/lib/unicorn/app/inetd.rb index 580b456..145cea7 100644 --- a/lib/unicorn/app/inetd.rb +++ b/lib/unicorn/app/inetd.rb @@ -85,6 +85,8 @@ module Unicorn::App errors.write("Failed to reap #{str} (PID:#{pid})\n") end } + out_rd.close + err_rd.close end end -- cgit v1.2.3-24-ge0c7