<div>I'd like to do the following:</div><div><br></div><div>auto pipes = pipeShell(command, Redirect.stdout | Redirect.stderr); </div><div><br></div><div>while(true){</div><div>version(A1)</div><div><div>  string line=pipes.stdout.readln;</div>
</div><div><div><div><div>version(A2)</div><div></div><div>  auto line=pipes.stdout.readChunk(10);</div></div></div></div><div><div><div>version(A3)</div><div></div><div>  auto line=pipes.stdout.readChar();</div></div></div>
<div><br></div><div>  // do something with line</div><div><br></div><div>  if(tryWait(pipes.pid).terminated)</div><div>    break;</div><div>}</div><div><br></div><div><br></div><div>The problem is that 'string line=pipes.stdout.readln;' seems to block until the process is terminated, ie if the command is a long running command that prints a line every 1 second for 10 seconds, this program will wait 10 seconds before starting the processing. </div>
<div>I also tried with rawRead, readf, fgetc but couldn't make it work.</div><div>I'm on OSX, if that matters.</div><div><br></div><div>Is there any way to achieve this?</div><div><br></div><div><br></div>