Part of lp.services
|Function||pidfile_path||Return the full pidfile path for the given service|
|Function||make_pidfile||Write the current process id to a PID file.|
|Function||remove_pidfile||Remove the PID file.|
|Function||get_pid||Return the PID for the given service as an integer, or None|
|Function||is_locked||Check if a PID file is locked.|
Also installs an atexit handler to remove the file on process termination.
Also installs a SIGTERM signal handler to remove the file on SIGTERM. If you install your own handler, you will want to call remove_pidfile inside it.
This should only be needed if you are overriding the default SIGTERM signal handler.
May raise a ValueError if the PID file is corrupt.
This method will only be needed by service or monitoring scripts.
Currently no checking is done to ensure that the process is actually running, is healthy, or died horribly a while ago and its PID being used by something else. What we have is probably good enough.