core: use process.alive? to avoid exceptions

This commit is contained in:
Mitchell Hashimoto 2014-04-13 14:24:05 -07:00
parent e3501f2079
commit ec35190cfc
2 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ BUG FIXES:
- core: Setting an ID on a provisioner now works. [GH-3424]
- core: All synced folder paths containing symlinks are fully
expanded before sharing. [GH-3444]
- core: Windows no longer sees "process not started" errors rarely.
- commands/box/repackage: Works again. [GH-3372]
- commands/box/update: Update should check for updates from latest
version. [GH-3452]

View File

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