boost-process
boost-process copied to clipboard
Confusing docs for set_args
The docs for set_args
say 'The first argument specifies the executable to start unless run_exe is used'. It's not clear from this if the first argument you pass is argv[0] or argv[1] when also using run_exe.
It turns out on Windows that the first argument in argv[0], rather than what you passed to run_exe. It looks like this is different from the POSIX behaviour:
explicit run_exe_(const std::string &s) : s_(s), cmd_line_(new char*[2])
{
cmd_line_[0] = const_cast<char*>(s_.c_str());
cmd_line_[1] = 0;
}