[D Cookbook]about "Communicating with external processes" part.
anonymous via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Sep 13 06:44:05 PDT 2015
On Sunday 13 September 2015 15:32, xky wrote:
> [ pipe.d ]:
> ======================================================================
> import std.process;
> import std.stdio;
>
> void main(){
> auto info = pipeProcess("child.exe");
> scope(exit) wait(info.pid);
>
> info.stdin.writeln("data to send to the process");
> info.stdin.close();
>
> foreach(line; stdout.byLine){
I think it should be `info.stdout.byLine` here.
> writeln("Received ", line, " from child.");
> }
> }
> ======================================================================
More information about the Digitalmars-d-learn
mailing list