autoproc = newExternalProcess();
autostdoutStream = newReadableStream();
// to use a stream you can make one and have a task consume itrunTask({
while(!stdoutStream.isClosed) {
autoline = stdoutStream.get!string(e => e == '\n');
}
});
// then make the process feed into the streamproc.onStdoutAvailable = (got) {
stdoutStream.feedData(got); // send it to the stream for processingstdout.rawWrite(got); // forward it through to our own thing// could also append it to a buffer to return it on complete
};
proc.start();
Please note that this does not currently and I have no plans as of this writing to add support for any kind of direct file descriptor passing. It always pipes them back to the parent for processing. If you don't want this, call the lower level functions yourself; the reason this class is here is to aid integration in the arsd.core event loop. Of course, I might change my mind on this.
UNSTABLE, NOT FULLY IMPLEMENTED. DO NOT USE YET.
You might use this like:
Please note that this does not currently and I have no plans as of this writing to add support for any kind of direct file descriptor passing. It always pipes them back to the parent for processing. If you don't want this, call the lower level functions yourself; the reason this class is here is to aid integration in the arsd.core event loop. Of course, I might change my mind on this.