Module: Batchbase::Core::ClassMethods

Defined in:
lib/batchbase/core.rb

Instance Method Summary collapse

Instance Method Details

#is_there_process(pid) ⇒ Object



113
114
115
116
117
118
# File 'lib/batchbase/core.rb', line 113

def is_there_process(pid)
  pid = pid.to_i
  raise 'pid must be number' if pid == 0
  process = Sys::ProcTable.ps(pid)
  process != nil && process.state == 'run'
end