Sha256: 753a4665af5309af3cb56f6bc79ceaffa4903cc61f78952efca94bf9edee5fd1

Contents?: true

Size: 609 Bytes

Versions: 1

Compression:

Stored size: 609 Bytes

Contents

module Lookout
  module Jruby

    class << self
      
      # stolen from process_exists gem https://github.com/wilsonsilva/process_exists/blob/master/lib/process_exists/core_ext/process.rb
      def process_exists?(pid)
        Process.kill(0, pid.to_i)
        true
      rescue Errno::ESRCH # No such process
        false
      rescue Errno::EPERM # The process exists, but you dont have permission to send the signal to it.
        true
      rescue NotImplementedError
        # this can happen when native could not be loaded
        false
      end
      private :process_exists?

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lookout-jruby-2.4.0 lib/lookout/jruby/cleanup_tempfiles_9k.rb