7inline std::vector<uint8_t> exec_pipe(std::string
const& command)
9 FILE* pipe = popen(command.c_str(),
"r");
11 throw std::runtime_error(
"popen() failed!");
14 std::vector<uint8_t> result;
17 size_t count = fread(buffer, 1,
sizeof(buffer), pipe);
18 result.insert(result.end(), buffer, buffer + count);