core: poll for process exit on SSH#exec with subprocess

This commit is contained in:
Mitchell Hashimoto 2014-02-12 21:31:05 -08:00
parent 79581df71b
commit 42fa0a6540
1 changed files with 7 additions and 1 deletions

View File

@ -174,7 +174,13 @@ module Vagrant
process = ChildProcess.build("ssh", *command_options)
process.io.inherit!
process.start
process.wait
# Poll for exited rather than call #wait because #wait will hold
# the GIL, locking up the entire Ruby VM. See ChildProcess #68
while !process.exited?
sleep 0.2
end
return process.exit_code
end
end