#include <process_launcher_basic.h>
Public Member Functions | |
~ProcessLauncherBasic () override=default | |
![]() | |
ProcessLauncher () | |
~ProcessLauncher () override=default | |
ProcessLauncherInterface::unique_ptr | createLauncher (int logFD=-1) override |
Create a new process launcher. More... | |
std::string | launcherName () const override final |
Get name of launcher. More... | |
pid_t | launchProcess (nlohmann::json procConfig, bool appendParentEnv=true) override final |
Fork a new process. Will read environment variables and start params from procConfig. More... | |
pid_t | stopProcess (unsigned int killWait) override final |
Stop a running process. More... | |
![]() | |
virtual | ~ProcessLauncherInterface ()=default |
virtual std::string | launcherName () const =0 |
Get name of launcher. More... | |
virtual ENGINE_RUNNING_STATUS | getProcessStatus () |
Get the current process status. If status cannot be retrieved, return ENGINE_RUNNING_STATUS::UNKNOWN. More... | |
LaunchCommandInterface * | launchCommand () const |
Get Launch Command. If launchProcess has not yet been called, return nullptr. More... | |
void | setFileDescriptor (int logFD) |
Sets the file descriptor that will be used by the launched process to write stdout and stderror. More... | |
Additional Inherited Members | |
![]() | |
using | ENGINE_RUNNING_STATUS = LaunchCommandInterface::ENGINE_RUNNING_STATUS |
![]() | |
using | shared_ptr = std::shared_ptr< ProcessLauncherInterface > |
using | const_shared_ptr = std::shared_ptr< const ProcessLauncherInterface > |
using | unique_ptr = std::unique_ptr< ProcessLauncherInterface > |
using | const_unique_ptr = std::unique_ptr< const ProcessLauncherInterface > |
![]() | |
static constexpr auto | LauncherType |
![]() | |
static constexpr auto | UNKNOWN = LaunchCommandInterface::ENGINE_RUNNING_STATUS::UNKNOWN |
static constexpr auto | RUNNING = LaunchCommandInterface::ENGINE_RUNNING_STATUS::RUNNING |
static constexpr auto | STOPPED = LaunchCommandInterface::ENGINE_RUNNING_STATUS::STOPPED |
![]() | |
static bool | checkEnvVar (const std::string &envVar) |
Checks given Environment variable for correctness (Should contain an '=' character) More... | |
static std::tuple< std::string, std::string > | splitEnvVar (const std::string &envVar) |
Split Environment variable string into variable name and value. More... | |
![]() | |
LaunchCommandInterface::unique_ptr | _launchCmd = nullptr |
Launch Command. More... | |
int | _logFD = -1 |
File descriptor to route stdout and stderror outputs in launched process. More... | |
|
overridedefault |