47 #ifndef _MIRA_PROCESSSPAWNMANAGER_H_ 48 #define _MIRA_PROCESSSPAWNMANAGER_H_ 83 std::vector<std::string>
args;
84 boost::optional<Process::Environment>
env;
101 void startProcess(
const Path& executable,
const std::vector<std::string>& args,
102 const std::string& name =
"",
103 bool respawn=
false,
bool required=
false,
104 bool shutdownRecursively=
false,
105 boost::optional<Process::Environment> env = boost::none,
106 const std::string& cleanupCmd=
"");
boost::mutex mMutex
Definition: ProcessSpawnManager.h:92
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
boost::filesystem::path Path
Typedef of a Path (shorter version for boost::filesystem::path)
Definition: Path.h:69
bool shutdownRecursively
Definition: ProcessSpawnManager.h:81
boost::thread mWatchdogThread
Definition: ProcessSpawnManager.h:91
Implements manager that starts processes and keeps track of them in order to respawn them if required...
Definition: ProcessSpawnManager.h:63
boost::function< void(const ProcessInfo &p)> RequiredProcessTerminatedFn
Definition: ProcessSpawnManager.h:94
std::string name
Definition: ProcessSpawnManager.h:75
boost::optional< Process::Environment > env
Definition: ProcessSpawnManager.h:84
Encapsulates a process, that was launched from the current process.
Definition: Process.h:93
std::string getName() const
Path executable
Definition: ProcessSpawnManager.h:82
std::vector< std::string > args
Definition: ProcessSpawnManager.h:83
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="")
bool required
Definition: ProcessSpawnManager.h:78
std::vector< ProcessInfoPtr > mProcesses
Definition: ProcessSpawnManager.h:89
Definition: ProcessSpawnManager.h:67
RequiredProcessTerminatedFn mRequiredProcessTerminatedFn
Definition: ProcessSpawnManager.h:96
boost::shared_ptr< ProcessInfo > ProcessInfoPtr
Definition: ProcessSpawnManager.h:87
std::string cleanup_cmd
Definition: ProcessSpawnManager.h:85
Functions for modifying file system paths.
Platform independent system calls.
std::string pid
Definition: ProcessSpawnManager.h:76
void startWatchdog(RequiredProcessTerminatedFn fn=RequiredProcessTerminatedFn())
Process process
Definition: ProcessSpawnManager.h:73
bool respawn
Definition: ProcessSpawnManager.h:77