24 ChildProcess() =
default;
27 ChildProcess(
const ChildProcess& other) =
delete;
28 ChildProcess& operator=(
const ChildProcess& other) =
delete;
30 ChildProcess(ChildProcess && other) =
delete;
31 ChildProcess& operator=(ChildProcess && other) =
delete;
43 const std::filesystem::path& program,
44 const std::vector<std::string>& args,
45 const std::filesystem::path& workingDir = {}
82 bool m_running =
false;
86 void* m_process =
nullptr;
87 void* m_job =
nullptr;
88 void* m_pipe =
nullptr;
void stop()
End the program and everything it started, and wait for it.
int exitCode()
How the last program exited.
bool running()
Whether a program was started and has not yet exited.
std::string takeOutput()
Take the output that arrived since the last call.
bool start(const std::filesystem::path &program, const std::vector< std::string > &args, const std::filesystem::path &workingDir={})
Start program with args in workingDir, ending any program started before.