core: make sure any Subprocess exits no matter what

This commit is contained in:
Mitchell Hashimoto 2014-02-12 21:35:54 -08:00
parent 42fa0a6540
commit 8bfb4bda2b
1 changed files with 5 additions and 0 deletions

View File

@ -203,6 +203,11 @@ module Vagrant
# Return an exit status container
return Result.new(process.exit_code, io_data[:stdout], io_data[:stderr])
ensure
if process && !process.exited?
# Make sure no matter what happens, the process exits
process.stop(2)
end
end
protected