Close read pipe immediately after reading and only when initialized

c.f. Homebrew/homebrew#22386.
This commit is contained in:
Jack Nagel 2013-09-07 22:17:52 -05:00
parent 4eb31ac676
commit 20ed26c655

View File

@ -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