lib/foreman/engine.rb in foreman-0.31.0 vs lib/foreman/engine.rb in foreman-0.32.0

- old
+ new

@@ -70,11 +70,17 @@ end def kill_all(signal="SIGTERM") running_processes.each do |pid, process| info "sending #{signal} to pid #{pid}" - Process.kill(signal, pid) rescue Errno::ESRCH + kill(signal, -pid) or kill(signal, pid) end + end + + def kill(signal, pid) + Process.kill signal, pid + rescue Errno::ESRCH + false end def terminate_gracefully info "sending SIGTERM to all processes" kill_all "SIGTERM"