Boost logo

Boost :

Subject: Re: [boost] [boost.process] 0.6 Redesign
From: Raphaël Londeix (raphael.londeix_at_[hidden])
Date: 2016-04-20 04:32:58


Hi,

I consider that an improvement of the current interface, not a major
> change. And that is as trivial as it gets.

It would be great if that interface, arguably nice, could boil down to a
more template-less and simpler interface.
Programs that tend to make an heavy use of external process launching
usually need to setup how the process are launched in different stages. You
might want to allow an iterative construction (and reuse) of the process
launch options.

For example:

    struct process_options
    {
        boost::optional<boost::filesystem::path> working_directory;
        boost::optional<std::map<std::string, std::string>> env;
        struct channel { ... };
        channel stdin;
        channel stdout;
        channel stderr;
    };

This can be hidden through a nice interface, using some good defaults.

But when you need to setup dynamically how a process should be launched,
there is no other choice than aggregating the setup options until the
launch point. The previous version of boost.process did not allow it[1],
and forced me to come up with my own thing[2]. Also, do you plan to port
back the type erasure PR[3] to your new version ?

Cheers,

[1] https://github.com/BorisSchaeling/boost-process/issues/2
[2]
https://github.com/hotgloupi/configure/blob/master/src/configure/Process.hpp
[3] https://github.com/BorisSchaeling/boost-process/pull/8


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk