Spawning a process: Can I "have my cake and eat it too"?

Adam D. Ruppe destructionator at gmail.com
Fri Mar 2 05:01:27 UTC 2018


I would suggest redirecting the child to the parent pipe, but 
then having the parent write the data back out to its own 
stdout/err.

It'd be a bit tricky with just Phobos' file though because it 
doesn't make it easy to wait for or be notified about input on 
it, but the underlying OS apis make this reasonably simple 
(WaitForMultipleObjects or select) if you're willing to write a 
bit more code to do it yourself or at least pull the underlying 
handles out of the Phobos file.



More information about the Digitalmars-d-learn mailing list