Go to the source code of this file.
A process, its status and its environment are defined by a ProcessData structure. The functions in this module can start and stop processes described by that structure.
|
Actual Process State.
|
|
Required state of a process.
|
|
Restart policy when a process has died.
|
|
Adds an environment variable to the process data.
|
|
Fiends a process entry by PID.
|
|
Fiends a process entry by tag.
|
|
Decrements the failure timer.
If a process crashes, the process control tries to restart it. If a situation occurs where a process gets restarted over and over again, the process control needs a criterion to detect this as an error and give up restarting the process. This works with a failure counter and a failure timer. Withe every restart of a process, its failure timer is set to an initial value, and its counter of subsequent failures is incremented. With every update interval, the failure timer is decremented. When the failure timer reaches 0, the counter of subsequent failures is also set to 0. When the counter of subsequent failures reaches a maximal value before the failure timer reaches zero, then the process will not be restarted again. |
|
Destroys a ProcessData structure and all its contents.
|
|
Checks if a process exists.
|
|
Returns true if the number of subsequent failures has reacehd its maximum.
|
|
Kill a process.
|
|
Registers a failure. This function has to be called when a process is to be restarted automatically. It increments the total failure couter. It increments the subsequent feilure couter if the failure timer is > 0; |
|
Registers a process start. This function is called by process_start. |
|
Registers a process truncation.
|
|
Resets the failure counter.
|
|
Resets the process statistics.
|
|
Sets an attribute.
|
|
Stops a process.
|
|
Starts a process.
|
|
Stops a process.
|
|
Sends a TERM signal to a process.
|