EpollProcess

Posix process with epoll integration of output streams (stdout & stderr).

Constructors

this
this(EpollSelectDispatcher epoll)

Constructor.

Members

Functions

finished
void finished(bool exited_ok, int exit_code)

Abstract method called when the process has finished. Once this method has been called, it is guaraneteed that stdout() will not be called again.

resume
void resume()

Resumes the process if it has been suspended using the suspend() method. The stdout handler is reregistered with epoll.

start
void start(const(mstring)[] args_with_command)

Starts the process with the specified command and arguments. Registers the handlers for the process' stdout and stderr streams with epoll, so that notifications will be triggered when the process generates output. The command to execute is args_with_command[0].

stderr
void stderr(ubyte[] data)

Abstract method called when data is received from the process' stderr stream.

stdout
void stdout(ubyte[] data)

Abstract method called when data is received from the process' stdout stream.

suspend
void suspend()

Suspends the output of a process. This is achieved simply by unregistering its stdout handler from epoll. This will have the effect that the process will, at some point, reach the capacity of its stdout buffer, and will then pause until the buffer has been emptied.

suspended
bool suspended()

Variables

process
Process process;

Process being executed.

Meta