aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-03-29 10:23:43 -0500
committerJack Nagel2014-03-29 10:23:43 -0500
commitb5979d76173d202c6754b5a553047dec4c6a7829 (patch)
tree6ab78e61cfdcdf33dd64443424cace83052ed743 /Library
parentfd447f94761b8a1b69352fd07f32c0bba779137b (diff)
downloadhomebrew-b5979d76173d202c6754b5a553047dec4c6a7829.tar.bz2
Future-proof the build process fork/wait
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_installer.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index b38c44687..cf6e28903 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -490,7 +490,7 @@ class FormulaInstaller
# to remain open in the child process.
args << { write => write } if RUBY_VERSION >= "2.0"
- fork do
+ pid = fork do
begin
read.close
exec(*args)
@@ -501,9 +501,9 @@ class FormulaInstaller
end
end
- ignore_interrupts(:quietly) do # the fork will receive the interrupt and marshall it back
+ ignore_interrupts(:quietly) do # the child will receive the interrupt and marshal it back
write.close
- Process.wait
+ Process.wait(pid)
data = read.read
read.close
raise Marshal.load(data) unless data.nil? or data.empty?