Module: SimpleDaemon::PidFile
- Defined in:
- lib/simple-daemon.rb
Class Method Summary collapse
Class Method Details
.recall(daemon) ⇒ Object
25 26 27 |
# File 'lib/simple-daemon.rb', line 25 def self.recall(daemon) IO.read(daemon.pid_fn).to_i rescue nil end |
.store(daemon, pid) ⇒ Object
21 22 23 |
# File 'lib/simple-daemon.rb', line 21 def self.store(daemon, pid) File.open(daemon.pid_fn, 'w') {|f| f << pid} end |