59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/childprocess.rb', line 59
def posix_spawn?
enabled = @posix_spawn || %w[1 true].include?(ENV['CHILDPROCESS_POSIX_SPAWN'])
return false unless enabled
require 'ffi'
begin
require "childprocess/unix/platform/#{ChildProcess.platform_name}"
rescue LoadError
raise ChildProcess::MissingPlatformError
end
require "childprocess/unix/lib"
require 'childprocess/unix/posix_spawn_process'
true
rescue ChildProcess::MissingPlatformError => ex
warn_once ex.message
false
end
|