vibe.core.process

Functions and structures for dealing with subprocesses and pipes.

This module is modeled after std.process, but provides a fiber-aware alternative to it. All blocking operations will yield the calling fiber instead of blocking it.

Public Imports

std.process
public import std.process : Pid, Redirect;

Members

Enums

Config
enum Config

Equivalent to std.process.Config except with less flag support

Functions

adoptProcessID
Process adoptProcessID(Pid pid)
Process adoptProcessID(int pid)

Register a process with vibe for fibre-aware handling. This process can be started from anywhere including external libraries or std.process.

collectOutput
string collectOutput(InputStream stream, size_t nbytes)

private

execute
auto execute(string program, string[string] env, Config config, size_t maxOutput, NativePath workDir)

Equivalent to std.process.execute.

execute
auto execute(string[] args, string[string] env, Config config, size_t maxOutput, NativePath workDir)
executeShell
auto executeShell(string command, string[string] env, Config config, size_t maxOutput, NativePath workDir, NativePath shellPath)

Equivalent to std.process.execute.

pipe
Pipe pipe()

Create a pipe, async equivalent of std.process.pipe.

pipeProcess
ProcessPipes pipeProcess(string[] args, Redirect redirect, string[string] env, Config config, NativePath workDir)
ProcessPipes pipeProcess(string program, Redirect redirect, string[string] env, Config config, NativePath workDir)
pipeShell
ProcessPipes pipeShell(string command, Redirect redirect, string[string] env, Config config, NativePath workDir, NativePath shellPath)

Equivalent to std.process.pipeProcess.

spawnProcess
Process spawnProcess(string[] args, string[string] env, Config config, NativePath workDir)
Process spawnProcess(string program, string[string] env, Config config, NativePath workDir)
spawnShell
Process spawnShell(string command, string[string] env, Config config, NativePath workDir, NativePath shellPath)

Equivalent to std.process.spawnProcess.

Mixins

__anonymous
mixin validateInputStream!PipeInputStream
Undocumented in source.
__anonymous
mixin validateOutputStream!PipeOutputStream
Undocumented in source.

Properties

userShell
NativePath userShell [@property getter]

Path to the user's preferred command interpreter.

Structs

Pipe
struct Pipe

A pipe created by pipe.

PipeInputStream
struct PipeInputStream

A stream for tBatchBufferhe write end of a pipe.

PipeOutputStream
struct PipeOutputStream

Stream for the read end of a pipe.

Process
struct Process

Represents a running process.

ProcessPipes
struct ProcessPipes

Returned from pipeProcess.

Variables

nativeShell
NativePath nativeShell;

The platform specific native shell path.

Meta