pidfile Module

class gaffer.pidfile.Pidfile(fname)[source]

Bases: object

Manage a PID file. If a specific name is provided it and ‘”%s.oldpid” % name’ will be used. Otherwise we create a temp file using os.mkstemp.

create(pid)[source]
rename(path)[source]

delete pidfile

validate()[source]

Validate pidfile and make it stale if needed