Module: Evilution::ProcessCleanup Private

Defined in:
lib/evilution/process_cleanup.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.safe_kill(signal, pid) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
11
12
# File 'lib/evilution/process_cleanup.rb', line 8

def safe_kill(signal, pid)
  ::Process.kill(signal, pid)
rescue Errno::ESRCH
  nil
end

.safe_wait(pid) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



14
15
16
17
18
# File 'lib/evilution/process_cleanup.rb', line 14

def safe_wait(pid)
  ::Process.wait(pid)
rescue Errno::ECHILD
  nil
end