Method: Vines::Daemon#stop
- Defined in:
- lib/vines/daemon.rb
#stop ⇒ Object
Use the pid stored in the pid file created from a previous call to start to send a TERM signal to the process. Do nothing if the daemon is not running.
29 30 31 32 33 34 35 |
# File 'lib/vines/daemon.rb', line 29 def stop 10.times do break unless running? Process.kill('TERM', pid) sleep(0.1) end end |