Kernel.exec still failing in OS X Leopard [closes GH-544]
This commit is contained in:
parent
db491e1f9b
commit
82c679b9a5
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue