Module: Process

Defined in:
lib/lyp/windows.rb

Class Method Summary collapse

Class Method Details

.getsidObject



2
3
4
5
6
7
8
# File 'lib/lyp/windows.rb', line 2

def self.getsid
  if `tasklist` =~ /^ruby\.exe\s+#{Process.pid}\s+[^\s]+\s+([0-9]+)/
    $1.to_i
  else
    0
  end
end