aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-03-29 02:24:01 -0500
committerJack Nagel2014-03-29 02:24:01 -0500
commit809c804499f16ed3a2c07a1b7eeddd4fc271eef2 (patch)
tree12125f0f1416c96198b53ee08552189c95ed976a /Library
parentc27eed10bd32f0005f3c52db68713892b0cfa974 (diff)
downloadbrew-809c804499f16ed3a2c07a1b7eeddd4fc271eef2.tar.bz2
Make sure we wait for the correct child
Fixes Homebrew/homebrew#27962.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/utils.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 1322abc8d..8fa86797f 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -95,13 +95,13 @@ end
module Homebrew
def self.system cmd, *args
puts "#{cmd} #{args*' '}" if ARGV.verbose?
- fork do
+ pid = fork do
yield if block_given?
args.collect!{|arg| arg.to_s}
exec(cmd.to_s, *args) rescue nil
exit! 1 # never gets here unless exec failed
end
- Process.wait
+ Process.wait(pid)
$?.success?
end
end