|
Boost : |
Subject: Re: [boost] [process] Formal Review starts today, 27 October
From: Klemens Morgenstern (klemens.morgenstern_at_[hidden])
Date: 2016-11-05 08:54:34
Am 05.11.2016 um 13:32 schrieb Bjorn Reese:
> On 10/30/2016 04:39 PM, Klemens Morgenstern wrote:
>
>>> Is it possible to redirect stderr to stdout? (like 2>&1). The reference
>>> documentation only mentions this under asynchronous pipe output.
>> If you mean to redirect the stdout to the stderr of the current process
>> - yes it is. This is what the FILE* overload is for, you can just write
>> std_out > stderr. I know it's a bit confusing, but std::cerr cannot be
>> used, because (1) it doesn not give access to the and secondly you can
>> change the rdbuf, redirecting std::cerr that way.
>
> I am asking about something like this:
>
> child(command, std_out > pipe, std_err > std_out);
>
> which corresponds to the shell redirection 2>&1.
>
What you can do is similar to the console syntax:
child c("foo", (std_out & std_err) > pipe);
which is the same as 2>&1.
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk