[Process] Help needed with boost::process::extend::on_*

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Process] Help needed with boost::process::extend::on_*

Boost - Users mailing list
I am using boost::process::child to create a child process:

boost::process::child child("foo");

This works fine so far (on Linux + Windows).

Now i want to use a handler which is executed during the fork process:

boost::process::child child("foo", boost::process::extend::on_setup = [](auto& exec) {
// ...

This also works fine - as long as a more or less up-to-date C++ compiler or C++ standard.
Since g++-4.8.5 (which I have to use) does not support auto template deduction for lambdas, i have to replace the lambda parameter type with a concrete type.

boost::process::child child("foo", boost::process::extend::on_setup = [](<WHAT_GOES_HERE?>& exec) {
// ...

Boost.Process documentation only uses the modern approach with auto template deduction. I simply cannot find an example/documentation where the concrete types are shown.


Boost-users mailing list
[hidden email]