Implements interfaces: twisted.application.runner._pidfile.IPIDFile

PID file implementation that does nothing.

This is meant to be used as a "active None" object in place of a PID file when no PID file is desired.

Method __init__ Undocumented
Method read Read the process ID stored in this PID file.
Method writeRunningPID Store the PID of the current process in this PID file.
Method remove Remove this PID file.
Method isRunning Determine whether there is a running process corresponding to the PID in this PID file.
Method __enter__ Enter a context using this PIDFile.
Method __exit__ Exit a context using this PIDFile.
Method _write Store a PID in this PID file.
def __init__(self): (source)
Undocumented
def read(self): (source)

Read the process ID stored in this PID file.

ReturnsThe contained process ID. (type: int)
RaisesNoPIDFoundIf this PID file does not exist.
EnvironmentErrorIf this PID file cannot be read.
ValueErrorIf this PID file's content is invalid.
def _write(self, pid): (source)

Store a PID in this PID file.

ParameterspidA PID to store. (type: int)
RaisesEnvironmentErrorIf this PID file cannot be written.
NoteThis implementation always raises an EnvironmentError.
def writeRunningPID(self): (source)

Store the PID of the current process in this PID file.

RaisesEnvironmentErrorIf this PID file cannot be written.
def remove(self): (source)

Remove this PID file.

RaisesEnvironmentErrorIf this PID file cannot be removed.
def isRunning(self): (source)

Determine whether there is a running process corresponding to the PID in this PID file.

ReturnsTrue if this PID file contains a PID and a process with that PID is currently running; false otherwise. (type: bool)
RaisesEnvironmentErrorIf this PID file cannot be read.
InvalidPIDFileErrorIf this PID file's content is invalid.
StalePIDFileErrorIf this PID file's content refers to a PID for which there is no corresponding running process.
def __enter__(self): (source)

Enter a context using this PIDFile.

Writes the PID file with the PID of the running process.

RaisesAlreadyRunningErrorA process corresponding to the PID in this PID file is already running.
def __exit__(self, excType, excValue, traceback): (source)

Exit a context using this PIDFile.

Removes the PID file.

API Documentation for Twisted, generated by pydoctor at 2020-03-20 23:54:06.