Sha256: ccdbf04c2fc11fb78b9d040abb3920a0c08e4f9abf0d21c13530c924eacf67de

Contents?: true

Size: 433 Bytes

Versions: 2

Compression:

Stored size: 433 Bytes

Contents

module Bluepill
  module ProcessConditions
    # Process must have cache_actual_pid set to false to function correctly:
    #
    # process.checks :zombie_process, :every => 5.seconds
    # process.cache_actual_pid = false

    class ZombieProcess < ProcessCondition
      def run(pid, _include_children)
        System.command(pid)
      end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bluepill-0.0.70 lib/bluepill/process_conditions/zombie_process.rb
bluepill-0.0.69 lib/bluepill/process_conditions/zombie_process.rb