Faster ways to redirect stdout of child process to file
    Thomas Mader via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Fri Aug 15 13:31:30 PDT 2014
    
    
  
I found out that the redirect was not responsible for the CPU 
time, it was some other code part which was responsible for it 
and totally unrelated to the redirect.
I also saw that a redirect in my case is much simpler by using 
spawnProcess:
auto logFile = File("errors.log", "w");
auto pid = spawnProcess(["dmd", "myprog.d"],
                         std.stdio.stdin,
                         std.stdio.stdout,
                         logFile);
    
    
More information about the Digitalmars-d-learn
mailing list