Module: Sys::ProcTree::Process
- Defined in:
- lib/sys/proctree/process.rb
Instance Method Summary collapse
Instance Method Details
#kill_tree(signal, pid) ⇒ Object
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.collect do |pid| begin ::Process.kill(signal, pid) ::Process.wait(pid) rescue [pid, nil] end end end |