|
Boost : |
Subject: Re: [boost] How to bind program termination with end-of-stream in Boost.Process 0.5?
From: Boris Schaeling (boris_at_[hidden])
Date: 2012-09-12 15:11:05
On Sun, 09 Sep 2012 02:00:06 +0200, alfC <alfredo.correa_at_[hidden]> wrote:
Hi Alfredo,
thanks for your question! Good to see that people start using the new
version. :)
> [...]One can make a look to read the output of the process until the
> program
> finishes, but the stream is not invalid after program termination.
> ...
> while(std::getline(is, s)){ // is is an stream associated with a
> process
> (e.g. '/usr/bin/ls')
> std::cout << "read: " << s << std::endl;
> }
> std::clog << "end" << std::endl; // never reach
> ...
Is "is" a Boost.Iostreams stream? If so, do you use Boost 1.50.0 or an
earlier version? Then I strongly recommend upgrading to Boost 1.51.0.
Various end-of-stream unit tests failed when I used Boost 1.50.0 because
of a bug in Boost.Iostreams.
HTH,
Boris
> [...]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk