5 Nov
2016
5 Nov
'16
12:32 p.m.
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.