Part of twisted.scripts._twistd_unix View Source View In Hierarchy
Method | preApplication | Do pre-application-creation setup. |
Method | postApplication | To be called after the application is created: start the application and run the reactor. After the reactor stops, clean up PID files and such. |
Method | removePID | Remove the specified PID file, if possible. Errors are logged, not raised. |
Method | setupEnvironment | Set the filesystem root, the working directory, and daemonize. |
Method | shedPrivileges | Change the UID and GID or the EUID and EGID of this process. |
Method | startApplication | Configure global process state based on the given application and run the application. |
Inherited from ApplicationRunner:
Instance Variable | config | The config object, which provides a dict-like interface. |
Instance Variable | application | Available in postApplication, but not preApplication. This is the application object. |
Instance Variable | profilerFactory | Factory for creating a profiler object, able to profile the application if options are set accordingly. |
Instance Variable | profiler | Instance provided by profilerFactory . |
Instance Variable | loggerFactory | Factory for creating object responsible for logging. |
Instance Variable | logger | Instance provided by loggerFactory . |
Method | __init__ | Undocumented |
Method | run | Run the application. |
Method | startReactor | Run the reactor with the given configuration. Subclasses should
probably call this from postApplication . |
Method | createOrGetApplication | Create or load an Application based on the parameters found in the given
ServerOptions
instance. |
Parameters | pidfile | The path to the PID tracking file. (type: str ) |
Parameters | chroot | If not None, a path to use as the filesystem root (using os.chroot ). (type: str or NoneType ) |
rundir | The path to set as the working directory. (type: str ) | |
nodaemon | A flag which, if set, indicates that daemonization should not be done. (type: bool ) | |
umask | The value to which to change the process umask. (type: int or NoneType ) | |
pidfile | If not None , the path to a file into which to put the PID of
this process. (type: str or NoneType ) |
Parameters | euid | A flag which, if set, indicates that only the effective UID and GID
should be set. (type: bool ) |
uid | If not None , the UID to which to switch. (type: int or NoneType ) | |
gid | If not None , the GID to which to switch. (type: int or NoneType ) |
Parameters | application | An object which can be adapted to service.IProcess
and service.IService . |