Method: Foreman::Process#run
- Defined in:
- lib/foreman/process.rb
#run(options = {}) ⇒ Object
Run a Process
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/foreman/process.rb', line 48 def run(={}) env = [:env].merge([:env] || {}) output = [:output] || $stdout runner = "#{Foreman.runner}".shellescape pgroup = Foreman.windows? ? :new_pgroup : :pgroup Dir.chdir(cwd) do Process.spawn env, (env), :out => output, :err => output, pgroup => true end end |