Go to the documentation of this file.
22 #ifndef LAUNCH_COMMAND_H
23 #define LAUNCH_COMMAND_H
27 #include <nlohmann/json.hpp>
63 const std::vector<std::string> &envParams,
64 const std::vector<std::string> &startParams,
65 bool appendParentEnv =
true,
int logFD = -1) = 0;
72 virtual pid_t
stopProcess(
unsigned int killWait) = 0;
84 virtual std::string_view
launchType()
const = 0;
92 template<const
char* LAUNCH_COMMAND>
104 #endif // LAUNCH_COMMAND_H
virtual pid_t stopProcess(unsigned int killWait)=0
Stop a running engine process.
virtual ENGINE_RUNNING_STATUS getProcessStatus()
Get the current engine process status. If status cannot be retrieved, return ENGINE_RUNNING_STATUS::U...
Definition: launch_command.h:78
@ UNKNOWN
Definition: launch_command.h:41
virtual pid_t launchProcess(const nlohmann::json &launcherConfig, const std::string &procCmd, const std::vector< std::string > &envParams, const std::vector< std::string > &startParams, bool appendParentEnv=true, int logFD=-1)=0
Fork a new process for the given engine. Will read environment variables and start params from engine...
LaunchCommandInterface()=default
static constexpr auto LaunchType
Definition: launch_command.h:97
Definition: launch_command.h:32
Definition: ptr_templates.h:28
Class for launch commands. Must be specialized further.
Definition: launch_command.h:93
@ RUNNING
Definition: launch_command.h:42
std::string_view launchType() const override final
Get launch command type.
Definition: launch_command.h:99
virtual ~LaunchCommandInterface()=default
ENGINE_RUNNING_STATUS
Engine Process status.
Definition: launch_command.h:39
const char LAUNCH_COMMAND[]
Definition: basic_fork.h:28
@ STOPPED
Definition: launch_command.h:43
virtual std::string_view launchType() const =0
Get launch command type.
nlohmann::json json
Definition: engine_json_server.cpp:31