Close read pipe immediately after reading and only when initialized
c.f. Homebrew/homebrew#22386.
This commit is contained in:
parent
4eb31ac676
commit
20ed26c655
@ -417,6 +417,7 @@ class FormulaInstaller
|
|||||||
write.close
|
write.close
|
||||||
Process.wait
|
Process.wait
|
||||||
data = read.read
|
data = read.read
|
||||||
|
read.close
|
||||||
raise Marshal.load(data) unless data.nil? or data.empty?
|
raise Marshal.load(data) unless data.nil? or data.empty?
|
||||||
raise Interrupt if $?.exitstatus == 130
|
raise Interrupt if $?.exitstatus == 130
|
||||||
raise "Suspicious installation failure" unless $?.success?
|
raise "Suspicious installation failure" unless $?.success?
|
||||||
@ -431,8 +432,6 @@ class FormulaInstaller
|
|||||||
f.rack.rmdir_if_possible
|
f.rack.rmdir_if_possible
|
||||||
end
|
end
|
||||||
raise
|
raise
|
||||||
ensure
|
|
||||||
read.close
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def link
|
def link
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user