A pidfile is a file containing the process ID of a running program.
A pidfile is a file containing the process ID of a running program (usually a daemon). The pidfile is useful to check that the daemon is still running or to send it a signal (for example to kill it).
Pidfiles can be written either by the daemon itself or by the monitoring program that launches it. The latter option is preferable because the daemon could die suddenly (e.g. due to a SIGKILL) and its pidfile would remain while its process ID could be reused by a new process.