From d2d96a072613d154c699da76c7f101b90ca1bfc1 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 13 Feb 2014 16:45:45 -0800 Subject: [PATCH] core: keep process group for SSH childprocess --- lib/vagrant/util/ssh.rb | 7 +++++++ vagrant.gemspec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/util/ssh.rb b/lib/vagrant/util/ssh.rb index 487b972b0..7f96dee8c 100644 --- a/lib/vagrant/util/ssh.rb +++ b/lib/vagrant/util/ssh.rb @@ -173,6 +173,13 @@ module Vagrant LOGGER.info("Executing SSH in subprocess: #{command_options.inspect}") process = ChildProcess.build("ssh", *command_options) process.io.inherit! + + # This is to workaround issue #69 on ChildProcess. This will + # be removed at some point. + if process.kind_of?(ChildProcess::Unix::Process) + process.keep_pgid = true if process.respond_to?(:keep_pgid=) + end + process.start process.wait return process.exit_code diff --git a/vagrant.gemspec b/vagrant.gemspec index e98dceca5..c489f00a8 100644 --- a/vagrant.gemspec +++ b/vagrant.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |s| s.rubyforge_project = "vagrant" s.add_dependency "bundler", "~> 1.5.2" - s.add_dependency "childprocess", "~> 0.4.1" + s.add_dependency "childprocess", "~> 0.4.2" s.add_dependency "erubis", "~> 2.7.0" s.add_dependency "i18n", "~> 0.6.0" s.add_dependency "listen", "~> 2.4.0"