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