boost process 设置工作目录

boost process 设置子进程工作目录

通过boost::process::start_dir 指定

std::string cmd = (AppContext::GetBinDir() / "agvtask.exe").string();
auto pipe_stream = std::make_unique<boost::process::ipstream>();
auto car_process = std::make_unique<boost::process::child>(cmd, boost::process::start_dir(AppContext::GetBinDir().parent_path() / "bin"));  //, boost::process::std_out > *pipe_stream

 

posted @ 2021-09-08 11:07  wolbo  阅读(175)  评论(0编辑  收藏  举报