From 8bfb4bda2ba043cee97ed7edb7936f38f88b3c4c Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 12 Feb 2014 21:35:54 -0800 Subject: [PATCH] core: make sure any Subprocess exits no matter what --- lib/vagrant/util/subprocess.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/vagrant/util/subprocess.rb b/lib/vagrant/util/subprocess.rb index da7215f07..db2130691 100644 --- a/lib/vagrant/util/subprocess.rb +++ b/lib/vagrant/util/subprocess.rb @@ -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