Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/rdmd
- import std.stdio;
- import std.process;
- void main(string[] argv) {
- auto pout = pipe();
- auto perr = pipe();
- auto spec = [ "find", "/", "-maxdepth", "2" ];
- writeln("Running ", spec);
- auto dartPid = spawnProcess(spec, std.stdio.stdin,
- pout.writeEnd, perr.writeEnd);
- auto rc = wait(dartPid);
- if (rc != 0) {
- writeln("**** Compilation failed(", rc,") ****");
- }
- foreach( line; pout.readEnd.byLine) {
- writeln(line);
- }
- foreach( line; perr.readEnd.byLine) {
- writeln("STDERR| ", line);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement