After hours of reading (obviously not comprehending) std.process and looking at code samples, I still can't even do something this simple. Open a Windows command line and run miscellaneous commands. Only the first command, dir" is shown in the final output.

auto pipe = pipeShell("dir", Redirect.all);

pipe.stdin.writeln("cd");
pipe.stdin.writeln("whomai");
pipe.stdin.flush();
pipe.stdin.close();
                
foreach(str; pipe.stdout.byLine)
    writefln("from shell: %s",str);


I tried putting the wait() command was well in various places. to no avail.


Reply via email to