1
0
Fork 0
mirror of https://gitlab.com/niansa/libhss.git synced 2025-03-06 20:49:21 +01:00
libhss/hss.hpp
2021-07-19 10:54:59 +02:00

18 lines
461 B
C++

#include <string>
#include <unistd.h>
#include <QIPC/ipc.hpp>
namespace HSS {
inline void run(QIPC& ipc, const std::string& file) {
if (fork() == 0) {
execlp("HSSChildLauncher", "child",
std::to_string(ipc.get_fds().get_in()).c_str(),
std::to_string(ipc.get_fds().get_out()).c_str(),
file.c_str(),
nullptr);
throw std::runtime_error("Failed to run HSSChildLauncher");
}
}
}