Module: Process

Defined in:
lib/sudo/support/process.rb

Class Method Summary collapse

Class Method Details

.exists?(pid) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
8
9
10
11
12
# File 'lib/sudo/support/process.rb', line 5

def exists?(pid)
  begin
    Process.getpgid( pid )
    true
  rescue Errno::ESRCH
    false
  end
end