pipeProcess: read stdout and stderror simultaneously

unDEFER via Digitalmars-d digitalmars-d at puremagic.com
Sun Nov 13 10:24:56 PST 2016


I have found! The magic word is Redirect.stderrToStdout. So the 
right code:

==========
auto rsync_pipes = pipeProcess(["rsync", archieve_option, "-vu", 
"--delete", path, copy_to], Redirect.stdout | 
Redirect.stderrToStdout);
scope(exit) wait(df_pipes.pid);

foreach (df_line; df_pipes.stdout.byLine)
{
// Handle errors and progress simultaneously
}
==========

Thank you.


More information about the Digitalmars-d mailing list