id summary reporter owner description type status milestone component version severity resolution keywords cc 13333 Child processes started with boost::process have incorrect argv if executable path contains spaces Jonathan Jaloszynski "If an executable to start has spaces in its path, the process started with either boost::process::child or boost::process::system will have a strange argv. Specifically, the segments of the executable's path will be individual elements in the argv array. To demonstrate this problem, the following program dumps argv: {{{ #include int main(int argc, char* argv[]) { // Dump the command line arguments. std::cout << argc << std::endl; for (int i = 0; i < argc; ++i) std::cout << argv[i] << std::endl; return 0; } }}} Compile this and place the resulting DumpCmdLine.exe in ""c:\dir with space\"" and ""c:\dirwithoutspace\"". The following program runs this executable using boost::process, and demonstrates the problem: {{{ #include ""stdafx.h"" #include #include int main() { boost::filesystem::path toRun{ ""c:\\dir with space\\DumpCmdLine.exe"" }; auto child = boost::process::child(toRun, L""realArgument""); child.wait(); return 0; } }}} The child process argv contains 4 elements, ""c:\dir"", ""with"", ""space\DumpCmdLine.exe"", and ""realArgument"". When there is no space in the executable path, the child process argv contains 2 elements: ""c:\dirwithoutspace\DumpCmdLine.exe"", and ""realArgument"". When DumpCmdLine.exe is called from the command line, it receives the same 2 arguments. The command line I used is: {{{ ""c:\dir with space\DumpCmdLine.exe"" realArgument }}} This was observed on a Windows 10 system, 64 bit build both debug and release configurations. Visual Studio 2017 (15.4.3) was used to build." Bugs new To Be Determined process Boost 1.65.0 Problem