diff --git a/lib/vagrant/ssh.rb b/lib/vagrant/ssh.rb index 3b811a7fd..4b8a1e22c 100644 --- a/lib/vagrant/ssh.rb +++ b/lib/vagrant/ssh.rb @@ -53,9 +53,6 @@ module Vagrant command_options << "-o ForwardX11Trusted=yes" end - # Some hackery going on here. On Mac OS X Leopard (10.5), exec fails - # (GH-51). As a workaround, we fork and wait. On all other platforms, - # we simply exec. command = "ssh #{command_options.join(" ")} #{options[:username]}@#{options[:host]}".strip env.logger.info("ssh") { "Invoking SSH: #{command}" } safe_exec(command) diff --git a/lib/vagrant/util/safe_exec.rb b/lib/vagrant/util/safe_exec.rb index 9a24a8b1f..8da48121d 100644 --- a/lib/vagrant/util/safe_exec.rb +++ b/lib/vagrant/util/safe_exec.rb @@ -2,7 +2,7 @@ module Vagrant module Util # This module provies a `safe_exec` method which is a drop-in # replacement for `Kernel.exec` which addresses a specific issue - # which manifests on OS X 10.5 and perhaps other operating systems. + # which manifests on OS X 10.5 (GH-51) and perhaps other operating systems. # This issue causes `exec` to fail if there is more than one system # thread. In that case, `safe_exec` automatically falls back to # forking. @@ -14,6 +14,7 @@ module Vagrant rescue_from = [] rescue_from << Errno::EOPNOTSUPP if defined?(Errno::EOPNOTSUPP) rescue_from << Errno::E045 if defined?(Errno::E045) + rescue_from << SystemCallError fork_instead = false begin