proc

Modules

channel
module proc.channel
pid
module proc.pid
type
module proc.type

Public Imports

proc.channel
public import proc.channel;
proc.pid
public import proc.pid;

Members

Functions

drain
auto drain(ProcessT p, ref T range, Duration timeout)

Drain the output from the process into an output range.

drain
auto drain(T p, Duration timeout)

Drain a process pipe until empty.

drainToNull
auto drainToNull(T p, Duration timeout)

Drain the process output until it is done executing.

scopeKill
auto scopeKill(T p)

Automatically terminate the process when it goes out of scope.

spawnShell
SpawnProcess spawnShell(scope const(char)[] command, scope const string[string] env, std.process.Config config = std.process.Config.none, scope const(char)[] workDir = null, scope string shellPath = std.process.nativeShell)

Async process that do not block on read from stdin/stderr.

waitForPendingData
void waitForPendingData(Process p)

Returns when the process has pending data.

waitUntilChildren
void waitUntilChildren(RawPid p, int num)

Wait for p to have num children or fail after 10s.

Structs

DrainByLineCopyRange
struct DrainByLineCopyRange(ProcessT)

Read the data from a ReadChannel by line.

DrainElement
struct DrainElement
DrainRange
struct DrainRange(ProcessT)

A range that drains a process stdout/stderr until it terminates.

PipeProcess
struct PipeProcess

Async process that do not block on read from stdin/stderr.

Sandbox
struct Sandbox(ProcessT)

Moves the process to a separate process group and on exit kill it and all its children.

SpawnProcess
struct SpawnProcess

Async process wrapper for a std.process SpawnProcess

Timeout
struct Timeout(ProcessT)

dispose the process after the timeout.

Meta

Authors

Joakim Brännström (joakim.brannstrom@gmx.com)