Logo ProcessKit API Reference

ProcessError Type

Structured failure type for ProcessKit operations. Named `ProcessError` (rather than just `Error`) to avoid colliding with the `Result.Error` constructor in F#. Honest-result verbs — `outputString`, `outputBytes`, `exitCode`, `probe` — return their value; only genuine failures surface as a `ProcessError` in the `Result` channel.

Union cases

Union case Description

Cancelled Program

Full Usage: Cancelled Program

Parameters:
    Program : string

The run was cancelled through its `CancellationToken`. A cancellation is always an error.

Program : string

CassetteMiss Program

Full Usage: CassetteMiss Program

Parameters:
    Program : string

A `RecordReplayRunner` in replay mode found no recorded entry matching the invocation.

Program : string

Exit(Program, Code, Stdout, Stderr)

Full Usage: Exit(Program, Code, Stdout, Stderr)

Parameters:
    Program : string
    Code : int
    Stdout : string
    Stderr : string

A success-requiring verb (`run`) observed a non-zero exit code.

Program : string
Code : int
Stdout : string
Stderr : string

Io Detail

Full Usage: Io Detail

Parameters:
    Detail : string

An underlying I/O failure not attributable to a specific exit.

Detail : string

NotFound(Program, Searched)

Full Usage: NotFound(Program, Searched)

Parameters:
    Program : string
    Searched : string option

The program could not be found. `Searched` is the search path that was probed, when known.

Program : string
Searched : string option

NotReady(Program, Timeout)

Full Usage: NotReady(Program, Timeout)

Parameters:

A readiness probe (`WaitForLineAsync` / `WaitForPortAsync` / `WaitForAsync`) did not succeed within its timeout.

Program : string
Timeout : TimeSpan

OutputTooLarge(Program, LineLimit, ByteLimit, TotalLines, TotalBytes)

Full Usage: OutputTooLarge(Program, LineLimit, ByteLimit, TotalLines, TotalBytes)

Parameters:
    Program : string
    LineLimit : int option
    ByteLimit : int option
    TotalLines : int
    TotalBytes : int

Captured line output exceeded the configured `OutputBufferPolicy` ceiling (`OverflowMode.Error`). Carries the configured caps and the cumulative totals seen.

Program : string
LineLimit : int option
ByteLimit : int option
TotalLines : int
TotalBytes : int

Parse(Program, Detail)

Full Usage: Parse(Program, Detail)

Parameters:
    Program : string
    Detail : string

Parsing the captured output into a typed value failed.

Program : string
Detail : string

ResourceLimit Detail

Full Usage: ResourceLimit Detail

Parameters:
    Detail : string

A `ResourceLimits` cap was requested but could not be enforced — the platform has no whole-tree limit primitive (macOS / the Linux process-group fallback), or the Linux cgroup v2 controllers could not be enabled (this process is not at the real cgroup root).

Detail : string

Signalled(Program, Signal, Stdout, Stderr)

Full Usage: Signalled(Program, Signal, Stdout, Stderr)

Parameters:
    Program : string
    Signal : int option
    Stdout : string
    Stderr : string

The process was terminated by a signal (Unix) or otherwise killed without a code.

Program : string
Signal : int option
Stdout : string
Stderr : string

Spawn(Program, Detail)

Full Usage: Spawn(Program, Detail)

Parameters:
    Program : string
    Detail : string

The process could not be spawned (a failure before or during launch).

Program : string
Detail : string

Stdin(Program, Detail)

Full Usage: Stdin(Program, Detail)

Parameters:
    Program : string
    Detail : string

The child's stdin source could not be read (e.g. a missing `FromFile` path) on an otherwise- successful run. A routine broken pipe — the child closed stdin early — is never reported here.

Program : string
Detail : string

Timeout(Program, Timeout, Stdout, Stderr)

Full Usage: Timeout(Program, Timeout, Stdout, Stderr)

Parameters:
    Program : string
    Timeout : TimeSpan
    Stdout : string
    Stderr : string

The run exceeded its configured timeout.

Program : string
Timeout : TimeSpan
Stdout : string
Stderr : string

Unobserved(Program, Detail)

Full Usage: Unobserved(Program, Detail)

Parameters:
    Program : string
    Detail : string

The process concluded but its actual exit status could not be observed (see `Outcome.Unobserved`) — a native API failure or an unresolved POSIX reap race. `Detail` carries the reason. Always a failure; never fabricated as a clean exit.

Program : string
Detail : string

Unsupported Operation

Full Usage: Unsupported Operation

Parameters:
    Operation : string

The requested operation is unsupported on this platform or in this configuration.

Operation : string

Instance members

Instance member Description

this.Code

Full Usage: this.Code

Returns: int option

The exit code when the error is an `Exit`; `None` otherwise (a signal kill or timeout has none).

Returns: int option

this.Combined

Full Usage: this.Combined

Returns: string option

The captured stdout and stderr joined (stdout, then stderr on a new line when both are non-empty) for the stream-carrying cases (`Exit` / `Signalled` / `Timeout`); `None` otherwise.

Returns: string option

this.IsCancelled

Full Usage: this.IsCancelled

Returns: bool
Returns: bool

this.IsCassetteMiss

Full Usage: this.IsCassetteMiss

Returns: bool
Returns: bool

this.IsExit

Full Usage: this.IsExit

Returns: bool
Returns: bool

this.IsIo

Full Usage: this.IsIo

Returns: bool
Returns: bool

this.IsNotFound

Full Usage: this.IsNotFound

Returns: bool
Returns: bool

this.IsNotReady

Full Usage: this.IsNotReady

Returns: bool
Returns: bool

this.IsOutputTooLarge

Full Usage: this.IsOutputTooLarge

Returns: bool
Returns: bool

this.IsParse

Full Usage: this.IsParse

Returns: bool
Returns: bool

this.IsResourceLimit

Full Usage: this.IsResourceLimit

Returns: bool
Returns: bool

this.IsSignalled

Full Usage: this.IsSignalled

Returns: bool
Returns: bool

this.IsSpawn

Full Usage: this.IsSpawn

Returns: bool
Returns: bool

this.IsStdin

Full Usage: this.IsStdin

Returns: bool
Returns: bool

this.IsTimeout

Full Usage: this.IsTimeout

Returns: bool
Returns: bool

this.IsTransient

Full Usage: this.IsTransient

Returns: bool

True for errors that may succeed on a retry (a spawn race or transient I/O). The instance form of `ProcessError.isTransient`, so it reads cleanly from C# as `err.IsTransient` (the not-found classifier already has the generated `err.IsNotFound` tester).

Returns: bool

this.IsUnobserved

Full Usage: this.IsUnobserved

Returns: bool
Returns: bool

this.IsUnsupported

Full Usage: this.IsUnsupported

Returns: bool
Returns: bool

this.Message

Full Usage: this.Message

Returns: string

A short, human-readable description for logs and diagnostics.

Returns: string

this.Program

Full Usage: this.Program

Returns: string option

The program the error is about, when it carries one — `None` for `ResourceLimit` / `Io` / `Unsupported`, which are not tied to a specific program.

Returns: string option

this.Signal

Full Usage: this.Signal

Returns: int option

The terminating signal number when the error is a `Signalled` with a known number; `None` otherwise.

Returns: int option

this.Stderr

Full Usage: this.Stderr

Returns: string option

The captured stderr when the error carries it (`Exit` / `Signalled` / `Timeout`); `None` otherwise.

Returns: string option

this.Stdout

Full Usage: this.Stdout

Returns: string option

The captured stdout when the error carries it (`Exit` / `Signalled` / `Timeout`); `None` otherwise.

Returns: string option

Type something to start searching.