Module: Process

Defined in:
lib/tagen/core/process.rb

Class Method Summary collapse

Class Method Details

.exists?(pid) ⇒ Boolean

Note:

for linux only

check if the pid’s process is running.

Parameters:

  • pid (String, Integer)

    process id

Returns:

  • (Boolean)

Raises:

  • (NotImplementError)


7
8
9
10
# File 'lib/tagen/core/process.rb', line 7

def self.exists?(pid)
	raise NotImplementError unless linux?
	File.exists?("/proc/#{pid}")
end