6 7 8 9 10 11 12 13 14 15 16
# File 'lib/sys/proctree/process.rb', line 6 def kill_tree(signal, pid) pids = ::Sys::ProcTree::Tree.find(pid) pids.map do |pid| begin ::Process.kill(signal, pid) ::Process.wait(pid) rescue [ pid, nil ] end end end