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::optional< Process::Environment >(), const std::string &cleanupCmd="") |
void | startWatchdog (RequiredProcessTerminatedFn fn=RequiredProcessTerminatedFn()) |
void | watchdog () |
Public Attributes | |
std::list< 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 |
|
inline |
|
inline |
|
inline |
|
inline |
std::list<ProcessInfoPtr> mProcesses |
boost::thread mWatchdogThread |
boost::mutex mMutex |
RequiredProcessTerminatedFn mRequiredProcessTerminatedFn |