Class: Bluepill::ProcessConditions::ZombieProcess

Inherits:
ProcessCondition show all
Defined in:
lib/bluepill/process_conditions/zombie_process.rb

Overview

Process must have cache_actual_pid set to false to function correctly:

process.checks :zombie_process, every: 5.seconds process.cache_actual_pid = false

Instance Method Summary collapse

Methods inherited from ProcessCondition

#format_value, #initialize

Constructor Details

This class inherits a constructor from Bluepill::ProcessConditions::ProcessCondition

Instance Method Details

#check(value) ⇒ Object



13
14
15
# File 'lib/bluepill/process_conditions/zombie_process.rb', line 13

def check(value)
  (value =~ /\<defunct\>/).nil?
end

#run(pid, _include_children) ⇒ Object



9
10
11
# File 'lib/bluepill/process_conditions/zombie_process.rb', line 9

def run(pid, _include_children)
  System.command(pid)
end