|
|
|
|
|
|
|
|
#ifndef _WIN32 |
|
|
#ifndef _WIN32 |
|
|
#include "./proc.hpp" |
|
|
#include "./proc.hpp" |
|
|
|
|
|
|
|
|
|
|
|
#include <spdlog/fmt/fmt.h> |
|
|
|
|
|
|
|
|
#include <poll.h> |
|
|
#include <poll.h> |
|
|
#include <sys/wait.h> |
|
|
#include <sys/wait.h> |
|
|
#include <unistd.h> |
|
|
#include <unistd.h> |
|
|
|
|
|
|
|
|
strings.push_back(nullptr); |
|
|
strings.push_back(nullptr); |
|
|
::execvp(strings[0], (char* const*)strings.data()); |
|
|
::execvp(strings[0], (char* const*)strings.data()); |
|
|
|
|
|
|
|
|
|
|
|
if (errno == ENOENT) { |
|
|
|
|
|
std::cerr << fmt::format("[ddslim child executor] The requested executable ({}) could not be found.", strings[0]); |
|
|
|
|
|
std::exit(-1); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
std::cerr << "[ddslim child executor] execvp returned! This is a fatal error: " |
|
|
std::cerr << "[ddslim child executor] execvp returned! This is a fatal error: " |
|
|
<< std::system_category().message(errno) << '\n'; |
|
|
<< std::system_category().message(errno) << '\n'; |
|
|
|
|
|
|