Class | Daemons::PidFile |
In: |
lib/daemons/pidfile.rb
|
Parent: | Pid |
A Pid-File is a file containing the process identification number (pid) that is stored in a well-defined location of the filesystem thus allowing other programs to find out the pid of a running script.
Daemons needs the pid of the scripts that are currently running in the background to send them so called signals. Daemons uses the TERM signal to tell the script to exit when you issue a stop command.
Pid-Files generated by Daemons have to following format:
<scriptname>.rb<number>.pid
(Note that <number> is omitted if only one instance of the script can run at any time)
Each file just contains one line with the pid as string (for example 6432).
Daemons is configurable to store the Pid-Files relative to three different locations:
dir | [R] | |
multiple | [R] | |
number | [R] | |
progname | [R] |