Skip to content

Commit

Permalink
Create a new process group when spawning a new process. This should p…
Browse files Browse the repository at this point in the history
…revent from SIGINT propagating to spawned processes. (#528)
  • Loading branch information
kovyrin authored and ddollar committed Apr 23, 2016
1 parent 7c45c1a commit 8c003b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/foreman/process.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ def run(options={})
env = @options[:env].merge(options[:env] || {})
output = options[:output] || $stdout
runner = "#{Foreman.runner}".shellescape

Dir.chdir(cwd) do
Process.spawn env, expanded_command(env), :out => output, :err => output
Process.spawn(env, expanded_command(env), :out => output, :err => output, :pgroup => true)
end
end

Expand Down

0 comments on commit 8c003b6

Please sign in to comment.