|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <dds/util/signal.hpp> |
|
|
#include <dds/util/signal.hpp> |
|
|
|
|
|
|
|
|
#include <spdlog/fmt/fmt.h> |
|
|
|
|
|
|
|
|
#include <spdlog/spdlog.h> |
|
|
|
|
|
|
|
|
#include <poll.h> |
|
|
#include <poll.h> |
|
|
#include <sys/wait.h> |
|
|
#include <sys/wait.h> |
|
|
|
|
|
|
|
|
} // namespace |
|
|
} // namespace |
|
|
|
|
|
|
|
|
proc_result dds::run_proc(const std::vector<std::string>& command) { |
|
|
proc_result dds::run_proc(const std::vector<std::string>& command) { |
|
|
|
|
|
spdlog::debug("Spawning subprocess: {}", quote_command(command)); |
|
|
int stdio_pipe[2] = {}; |
|
|
int stdio_pipe[2] = {}; |
|
|
auto rc = ::pipe(stdio_pipe); |
|
|
auto rc = ::pipe(stdio_pipe); |
|
|
check_rc(rc == 0, "Create stdio pipe for subprocess"); |
|
|
check_rc(rc == 0, "Create stdio pipe for subprocess"); |