|
MIRA
|
Implements manager that starts processes and keeps track of them in order to respawn them if required, etc. More...
#include <platform/ProcessSpawnManager.h>
Classes | |
| struct | ProcessInfo |
Public Types | |
| typedef boost::shared_ptr< ProcessInfo > | ProcessInfoPtr |
| typedef boost::function< void(const ProcessInfo &p)> | RequiredProcessTerminatedFn |
Public Member Functions | |
| ~ProcessSpawnManager () | |
| void | startProcess (const Path &executable, const std::vector< std::string > &args, const std::string &name="", bool respawn=false, bool required=false, bool shutdownRecursively=false, boost::optional< Process::Environment > env=boost::none, const std::string &cleanupCmd="") |
| void | startWatchdog (RequiredProcessTerminatedFn fn=RequiredProcessTerminatedFn()) |
Public Attributes | |
| std::vector< ProcessInfoPtr > | mProcesses |
| boost::thread | mWatchdogThread |
| boost::mutex | mMutex |
| RequiredProcessTerminatedFn | mRequiredProcessTerminatedFn |
Implements manager that starts processes and keeps track of them in order to respawn them if required, etc.
| typedef boost::shared_ptr<ProcessInfo> ProcessInfoPtr |
| typedef boost::function<void(const ProcessInfo& p)> RequiredProcessTerminatedFn |
| ~ProcessSpawnManager | ( | ) |
| void startProcess | ( | const Path & | executable, |
| const std::vector< std::string > & | args, | ||
| const std::string & | name = "", |
||
| bool | respawn = false, |
||
| bool | required = false, |
||
| bool | shutdownRecursively = false, |
||
| boost::optional< Process::Environment > | env = boost::none, |
||
| const std::string & | cleanupCmd = "" |
||
| ) |
| void startWatchdog | ( | RequiredProcessTerminatedFn | fn = RequiredProcessTerminatedFn() | ) |
| std::vector<ProcessInfoPtr> mProcesses |
| boost::thread mWatchdogThread |
| boost::mutex mMutex |
| RequiredProcessTerminatedFn mRequiredProcessTerminatedFn |
1.8.14