48std::expected<Child, std::string>
spawnChild(
const std::filesystem::path& binary,
49 const std::vector<std::string>& args,
50 const std::filesystem::path& logFile);
Definition http_server.h:27
std::expected< Child, std::string > spawnChild(const std::filesystem::path &binary, const std::vector< std::string > &args, const std::filesystem::path &logFile)
Runs binary with args, with its output appended to logFile.
Definition child_process_posix.cc:42
bool terminateChild(const Child &child, std::chrono::milliseconds grace)
Asks child to exit, waits up to grace, then kills it and everything it started.
Definition child_process_posix.cc:142
std::optional< int > waitChild(const Child &child, std::chrono::milliseconds timeout)
Waits up to timeout for child to exit, and reaps it.
Definition child_process_posix.cc:115
bool childAlive(const Child &child)
Whether child is still running.
Definition child_process_posix.cc:108
std::chrono::milliseconds timeout
Definition somanet_procedures.cc:464
A started child, as the platform identifies it.
Definition child_process.h:33
std::int64_t pid
Definition child_process.h:34
std::intptr_t group
Definition child_process.h:36
std::intptr_t handle
Definition child_process.h:35