diff options
| author | Jack Nagel | 2014-03-29 02:24:01 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-03-29 02:24:01 -0500 |
| commit | 809c804499f16ed3a2c07a1b7eeddd4fc271eef2 (patch) | |
| tree | 12125f0f1416c96198b53ee08552189c95ed976a | |
| parent | c27eed10bd32f0005f3c52db68713892b0cfa974 (diff) | |
| download | brew-809c804499f16ed3a2c07a1b7eeddd4fc271eef2.tar.bz2 | |
Make sure we wait for the correct child
Fixes Homebrew/homebrew#27962.
| -rw-r--r-- | Library/Homebrew/utils.rb | 4 |
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 |
