A generic daemon class.
More...
|
|
| stdin = stdin |
| |
|
| stdout = stdout |
| |
|
| stderr = stderr |
| |
|
| pidfile = pidfile |
| |
|
| delpid |
| |
|
| | _isprocessrunning (self, pid) |
| | Checks if the process with provided pid is running by checking the /proc directory.
|
| |
A generic daemon class.
Usage: subclass the Daemon class and override the run() method
◆ __init__()
| Lib.rave_daemon.Daemon.__init__ |
( |
| self, |
|
|
| pidfile, |
|
|
| stdin = '/dev/null', |
|
|
| stdout = '/dev/null', |
|
|
| stderr = '/dev/null' ) |
Constructor.
- Parameters
-
| pidfile | string to the file containing the PID |
| stdin | string path to where to direct stdin |
| stdout | string path to where to direct stdout |
| stderr | string path to where to direct stderr |
◆ _isprocessrunning()
| Lib.rave_daemon.Daemon._isprocessrunning |
( |
| self, |
|
|
| pid ) |
|
protected |
Checks if the process with provided pid is running by checking the /proc directory.
- Parameters
-
| pid | - the pid to check for |
- Returns
- True if a process with provided pid is running, otherwise False
◆ daemonize()
| Lib.rave_daemon.Daemon.daemonize |
( |
| self | ) |
|
◆ delpid()
| Lib.rave_daemon.Daemon.delpid |
( |
| self | ) |
|
◆ restart()
| Lib.rave_daemon.Daemon.restart |
( |
| self | ) |
|
◆ run()
| Lib.rave_daemon.Daemon.run |
( |
| self | ) |
|
◆ start()
| Lib.rave_daemon.Daemon.start |
( |
| self | ) |
|
◆ stop()
| Lib.rave_daemon.Daemon.stop |
( |
| self | ) |
|
The documentation for this class was generated from the following file: