mirror of
https://gitlab.com/niansa/libhss.git
synced 2025-03-06 20:49:21 +01:00
18 lines
461 B
C++
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");
|
|
}
|
|
}
|
|
}
|