Python python-daemon

From wikinotes
Revision as of 16:06, 12 May 2018 by Will (talk | contribs) (→‎Documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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')
)