The freezer.lib.pep3143daemon.pidfile Module

Simple PidFile Module for a pep3143 daemon implementation.

class freezer.lib.pep3143daemon.pidfile.PidFile(pidfile)[source]

Bases: object

PidFile implementation for PEP 3143 Daemon.

This Class can also be used with pythons ‘with’ statement.

Parameters:pidfile (str) – filename to be used as pidfile, including path
acquire()[source]

Acquire the pidfile.

Create the pidfile, lock it, write the pid into it and register the release with atexit.

Returns:None
Raise:SystemExit
release()[source]

Release the pidfile.

Close and delete the Pidfile.

Returns:None