From 691f962b0dd63c03cfeaa1395eebee430a38d6e3 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 7 Sep 2014 20:41:18 -0500 Subject: [PATCH] Fix file descriptor leak in Formula#system --- Library/Homebrew/formula.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 94cc964a91..59e81ad32f 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -571,6 +571,7 @@ class Formula $stdout.reopen(out) $stderr.reopen(out) + out.close args.collect!{|arg| arg.to_s} exec(cmd, *args) rescue nil puts "Failed to execute: #{cmd}"