#if defined(OS_LINUX) #include #include #include #include namespace hex { void executeCmd(const std::vector &argsVector) { std::vector cArgsVector; for (const auto &str : argsVector) { cArgsVector.push_back(const_cast(str.c_str())); } cArgsVector.push_back(nullptr); if (fork() == 0) { execvp(cArgsVector[0], &cArgsVector[0]); log::error("execvp() failed: {}", strerror(errno)); exit(EXIT_FAILURE); } } } #endif