|
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-18 14:31:14
On Tue, 18 Sep 2012 04:29:37 +0200, alfC <alfredo.correa_at_[hidden]> wrote:
> [...]Thanks, the program worked (boost 1.48) and I posted the solution in
> stakoverflow: http://stackoverflow.com/a/12469478/225186
> I don't have any idea why this works vs. the other. I wonder if I have
> to do the same for doing output to the process.
It's required to close the write-end of the pipe also in the parent
process. The child process inherits the write-end and closes it. But it
really closes only a copy. Once the file_descriptor_sink initialized with
close_handle goes out of the scope, the write-end in the parent process is
closed, too.
HTH,
Boris
> [...]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk