Running a process using boost process in async mode with timeout
问题 In the following code, I am trying to implement a program that runs a shell command and get the stdio , stderr and return code. I am doing it using boost process in the async mode as advised here. namespace bp = boost::process; class Process { public: Process(std::string & cmd, const int timeout); void run(); private: void timeout_handler(); const std::string command; const int timeout; bool killed; bool stopped; std::string stdOut; std::string stdErr; int returnStatus; boost::asio::io