I am using boost process v2 from the 1.86 version of the boost library.
The following code is intended to redirect stdout to a file. It creates the file but the contents of stdout are not written to it; the file size is zero. When I redirect stdout to a pipe, the pipe contains the expected result.
I guessed at how to write the code to redirect stdout to a file, as I could not find any example in the documentation or online. So I have probably not done it right.
I am using boost process v2 from the 1.86 version of the boost library.
The following code is intended to redirect stdout to a file. It creates the file but the contents of stdout are not written to it; the file size is zero. When I redirect stdout to a pipe, the pipe contains the expected result.
I guessed at how to write the code to redirect stdout to a file, as I could not find any example in the documentation or online. So I have probably not done it right.