diff --git a/lib/foreman/engine.rb b/lib/foreman/engine.rb index fcaf512..bd75cd4 100644 --- a/lib/foreman/engine.rb +++ b/lib/foreman/engine.rb @@ -63,7 +63,7 @@ class Foreman::Engine def stop(name, signal='SIGTERM') running_processes.each do |pid, process| - unless name.nil? + unless name == ALL_PROCESSES # Comparing against process.entry.name instead of process.name to # make sure we match the process name exactly for any/all # concurrently running processes by this name @@ -104,10 +104,10 @@ private ###################################################################### return if @terminating @terminating = true Timeout.timeout(5) do - stop(nil) + stop ALL_PROCESSES end rescue Timeout::Error - stop(nil, 'SIGKILL') + stop(ALL_PROCESSES, 'SIGKILL') rescue Errno::ECHILD end