RSC
0.17.1
|
A wrapper to call a different command as a subprocess and control its lifecycle. More...
#include <Subprocess.h>
Public Member Functions | |
virtual | ~Subprocess () |
Static Public Member Functions | |
static SubprocessPtr | newInstance (const std::string &command, const std::vector< std::string > &args=std::vector< std::string >()) |
Creates a new subprocess for the given command with the specified arguments. More... | |
Protected Member Functions | |
Subprocess () | |
A wrapper to call a different command as a subprocess and control its lifecycle.
This class uses the RAII idiom to manage the subprocces. This means that the called process will be terminated on destruction of an instance of this class.
This class is intended to provide a platform-independent way of controlling a command. Hence, a factory method is used instead of a normal constructor to automatically instantiate the platform-specific implementations.
Subclasses ensure that the process is started in the constructor and terminated in the destructor.
Definition at line 58 of file Subprocess.h.
|
virtual |
Definition at line 45 of file Subprocess.cpp.
|
protected |
Definition at line 42 of file Subprocess.cpp.
|
static |
Creates a new subprocess for the given command with the specified arguments.
command | command to call |
args | arguments for the command. The command itself must not be given. It is automatically passed by this class. |
std::runtime_error | error starting the command |
Definition at line 48 of file Subprocess.cpp.