Boost logo

Boost :

Subject: Re: [boost] Formal Review of Proposed Boost.Process library
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2011-02-21 12:29:33

Artyom wrote:
>> Or maybe something like
>> command_line_params ls_params;
>> ls_params.add("--reverse");
>> ls_params.add("-l");
>> command_line_params grep_params;
>> grep_params.add("^d");
>> grep.stdin().connect(ls.stdout());
>> ls.spawn(ls_params);
>> grep.spawn(grep_params);
>> +- - something like that.
> Or even better:
> pipe::connect(ls.stdout(),grep.stdin());
> ls.spawn("--reverse","-l","/usr/bin");
> grep.spawn("^d");
> ls.wait();
> grep.wait();
> I think this would be much more readable
> and what is important maintainable.

I've posted a similar approach in the original review thread with 'arg'
and 'args' classes with operator() usage inspired by boost spirit's
symbols class. The operator is templated and uses boost::lexical_cast to
  convert to a std::[w]string as appropriate.


returns an args instance. has some initial documentation and describes an
approach that's similar to what you describe. A zip file is attached to
the posting

I was thinking that Stjepan Rajko's previously reviewed Data Flow
library's interface was very applicable to the child process domain.
It's described at


Boost list run by bdawes at, gregod at, cpdaniel at, john at