Class: Servolux::Daemon
Overview
monkey patches for servolux
Instance Method Summary collapse
- #alive? ⇒ Boolean
-
#get_pid ⇒ Object
provide pid to external libraries.
Instance Method Details
#alive? ⇒ Boolean
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/emissary/servolux.rb', line 22 def alive? pid = retrieve_pid Process.kill(0, pid) true rescue TypeError # don't fail on nil being passed to kill # usually means pid was nil, so return false false rescue Errno::ESRCH, Errno::ENOENT false rescue Errno::EACCES => err logger.error "You do not have access to the PID file at " \ "#{pid_file.inspect}: #{err.}" false end |
#get_pid ⇒ Object
provide pid to external libraries
21 |
# File 'lib/emissary/servolux.rb', line 21 def get_pid() retrieve_pid; end |