#pragma once #include #include #include #include #include #include namespace processes { struct Process { pid_t pid; uint32_t exitCode; uint32_t forcedExitCode; bool terminationRequested; }; void *allocProcessHandle(pid_t pid); Process* processFromHandle(void* hHandle, bool pop); std::optional resolveExecutable(const std::string &command, bool searchPath); int spawnWithCommandLine(const std::string &applicationName, const std::string &commandLine, pid_t *pidOut); int spawnWithArgv(const std::string &applicationName, const std::vector &argv, pid_t *pidOut); std::vector splitCommandLine(const char *commandLine); }