lib/cumuli/app/foreman_process.rb in cumuli-0.3.0 vs lib/cumuli/app/foreman_process.rb in cumuli-0.3.1

- old
+ new

@@ -43,12 +43,19 @@ !!pid end def stop return if @killed_it - Process.kill('INT', 0) # kills all processes in the group + kill_children @killed_it = true @pid = nil + end + + def kill_children + pids = PS.new.tree(pid) + pids.reverse.each do |p| + Process.kill("KILL", p) + end end end end end