On 31 Oct 2016 at 13:18, Gavin Lambert wrote:
Now the problem I see is this: what happens here?
auto compile = bp::child("c++"); compile.output(bp::null); compile("main.cpp"); compile.env({"PATH", "/foo"});
The fourth call should fail (and probably throw), since it's impossible to change the environment after the process has been started. Otherwise that should work as you'd expect.
The idea in my original proposal of that form (https://godbolt.org/g/38C0KH) was to enable quick and natural child worker factories e.g. auto compile = bp::child("c++"); compile.output(bp::null); bp::child::future child1 = compile("main.cpp"); compile.env({"", "/foo"}); bp::child::future child2 = compile("main.cpp"); ... more config changes and more child launches ... Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/