// #include // #include // #include // #include // #include // std::vector exec(std::string command) { // char buffer[128]; // std::vector result; // FILE* pipe = popen(command.c_str(), "r"); // try { // while (fgets(buffer, sizeof buffer, pipe) != NULL) { // result.push_back(buffer); // } // } catch (...) { // pclose(pipe); // throw; // } // pclose(pipe); // return result; // }