module Thyme::ProcessHandler
Overview
Handles all things related to PID!
The Thyme timer runs as a daemon process. Stopping/pausing/unpausing are all initiated by a secondary process. It sends a signal to the main daemon. In order to do so, it needs the daemon's PID which is stored in the PID_FILE.
See Thyme::SignalHandler for the actual message sending. This module only deals with reading/writing the daemon's PID.
Extended Modules
Defined in:
thyme/process_handler.crConstant Summary
-
PID_FILE =
"#{ENV["HOME"]}/.thyme-pid"
Instance Method Summary
-
#delete_pid
Clean up by removing PID_FILE.
-
#read_pid
Returns the PID of the main daemon process.
-
#running?
Returns true if main daemon is running.
-
#write_pid
Writes the current process's PID to the PID_FILE.
Instance Method Detail
Returns the PID of the main daemon process. Should only be used by the secondary processes (eg during stopping/pausing/unpausing).
Writes the current process's PID to the PID_FILE. Must only be used by the main process. Must never be used by secondary processes.