core: keep process group for SSH childprocess

This commit is contained in:
Mitchell Hashimoto 2014-02-13 16:45:45 -08:00
parent b1bed68bed
commit d2d96a0726
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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"