From 20ed26c655601006ba06e558e5c3cb9962e51546 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 7 Sep 2013 22:17:52 -0500 Subject: [PATCH] Close read pipe immediately after reading and only when initialized c.f. Homebrew/homebrew#22386. --- Library/Homebrew/formula_installer.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 26a1b175f1..91766bbeab 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -417,6 +417,7 @@ class FormulaInstaller write.close Process.wait data = read.read + read.close raise Marshal.load(data) unless data.nil? or data.empty? raise Interrupt if $?.exitstatus == 130 raise "Suspicious installation failure" unless $?.success? @@ -431,8 +432,6 @@ class FormulaInstaller f.rack.rmdir_if_possible end raise - ensure - read.close end def link