boost-process icon indicating copy to clipboard operation
boost-process copied to clipboard

Confusing docs for set_args

Open alamaison opened this issue 8 years ago • 0 comments

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;
    }

alamaison avatar May 30 '16 15:05 alamaison