Class ExternalProcess

UNSTABLE, NOT FULLY IMPLEMENTED. DO NOT USE YET.

class ExternalProcess;

You might use this like:

auto proc = new ExternalProcess();
auto stdoutStream = new ReadableStream();

// to use a stream you can make one and have a task consume it
runTask({
	while(!stdoutStream.isClosed) {
		auto line = stdoutStream.get!string(e => e == '\n');
	}
});

// then make the process feed into the stream
proc.onStdoutAvailable = (got) {
	stdoutStream.feedData(got); // send it to the stream for processing
	stdout.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.

Constructors

NameDescription
this (program, args) This is the native version for Posix.

Methods

NameDescription
isComplete ()
start ()
status ()
stderr ()
stdin ()
stdout ()
waitForCompletion ()