From ee99f42e45da7853a57bda448b2f2e9be8c50768 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 20 Apr 2014 09:07:49 -0700 Subject: [PATCH] core: only output error on batch action if not forked --- lib/vagrant/batch_action.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/vagrant/batch_action.rb b/lib/vagrant/batch_action.rb index 764247c67..aaae23732 100644 --- a/lib/vagrant/batch_action.rb +++ b/lib/vagrant/batch_action.rb @@ -90,9 +90,13 @@ module Vagrant # Store the exception that will be processed later Thread.current[:error] = e - # Let the user know that this process had an error early - # so that they see it while other things are happening. - machine.ui.error(I18n.t("vagrant.general.batch_notify_error")) + # We can only do the things below if we do not fork, otherwise + # it'll hang the process. + if Process.pid == start_pid + # Let the user know that this process had an error early + # so that they see it while other things are happening. + machine.ui.error(I18n.t("vagrant.general.batch_notify_error")) + end end # If we forked during the process run, we need to do a hard