On June 4, 2016 6:01:52 PM EDT, Klemens Morgenstern
You can find the documentation here: http://klemens-morgenstern.github.io/process/ Get the source code from here: https://github.com/klemens-morgenstern/boost-process
I would like to immediately suggest that when you show a code example with no explanation of what it is doing that you put comments in the code example. This should be true whether the code example is in a message or in your docs.
You're of course right. I've worked too long on this, so it all seems obvious to me. I'll add some more detailed example in the documentation as soon as I have the time. As for the previous example (since I can't edit the mail):
pstream pipe; //iostream implementation with a pipe
//start the process child c( "some_prog", //program name "--some-arg", //argument env["PATH"]+="C:/stuff", //add C:/stuff to the PATH-environment variable std_in < "data.csv", //redirect stdin to a file std_out > pipe, //redirect stdout to created pipe std_err > null, //redirect stderr to /dev/null start_dir="./bin");//start in ./bin
std::string data; pipe >> data; //read a string from the pipe.
c.wait(); //wait for the program to exit cout << c.exit_code() << endl;//print the return code
I inferred the precise meaning from the code before you added the comments, which implies that it's intuitive (to me at least). ___ Rob (Sent from my portable computation engine)