Python python-daemon
From wikinotes
Install
pip install python-daemon
Documentation
https://www.python.org/dev/peps/pep-3143/ PEP module is tailored to https://pagure.io/python-daemon/ official homepage
Usage
import daemon from daemon import pidfile context = daemon.DaemonContext( pidfile=pidfile.PIDLockFile('/var/run/perf-agent.pid') )