Module: Daemon::PidFile
- Defined in:
- lib/serverside/daemon.rb
Overview
Stores and recalls the daemon pid.
Class Method Summary collapse
-
.recall(daemon) ⇒ Object
Recalls the daemon pid.
- .remove(daemon) ⇒ Object
-
.store(daemon, pid) ⇒ Object
Stores the daemon pid.
Class Method Details
.recall(daemon) ⇒ Object
Recalls the daemon pid. If the pid can not be recalled, an error is raised.
22 23 24 25 26 |
# File 'lib/serverside/daemon.rb', line 22 def self.recall(daemon) IO.read(daemon.pid_fn).to_i rescue raise 'Pid not found. Is the daemon started?' end |