boost启动进程1234567891011121314151617181920212223242526namespace bp = boost::process;do{ bp::ipstream is; bp::child middlewarex86( homedir + "/mirror_size.sh" , args , (bp::std_out & bp::std_err) > is // std_out和std_err重定向到is ); // 运行 if (!middlewarex86.running()) { break; } // 读输出 if (std::getline(is, line) && !line.empty()) { exec = true; } if (middlewarex86.joinable()) { // 等待运行结束 middlewarex86.wait(); }}while(0);