diff options
| author | Jack Nagel | 2014-03-29 02:24:01 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-03-29 02:24:01 -0500 |
| commit | aaaaa1c7fe50547d5e5daf296cf0209eb9eb330e (patch) | |
| tree | 65be668b399f4858b3774376ba4bccc4abcf55d8 /Library/Homebrew | |
| parent | 0b515fba6b65d2e0aba6e834547a316c4a5adaa1 (diff) | |
| download | homebrew-aaaaa1c7fe50547d5e5daf296cf0209eb9eb330e.tar.bz2 | |
Make sure we wait for the correct child
Fixes #27962.
Diffstat (limited to 'Library/Homebrew')
| -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 |
