ExternalRuntimeTransport.ProcessExit (ExternalRuntimeTransport v0.1.0)

Copy Markdown View Source

Normalized process exit information shared by the runtime and provider profiles.

Summary

Functions

Normalizes raw subprocess exit reasons into a stable struct.

Returns true when the normalized exit represents success.

Types

status()

@type status() :: :success | :exit | :signal | :error

t()

@type t() :: %ExternalRuntimeTransport.ProcessExit{
  code: non_neg_integer() | nil,
  reason: term(),
  signal: atom() | integer() | nil,
  status: status(),
  stderr: binary() | nil
}

Functions

from_reason(reason, opts \\ [])

@spec from_reason(
  term(),
  keyword()
) :: t()

Normalizes raw subprocess exit reasons into a stable struct.

This includes raw integer exit statuses, including the shifted values some platforms report as code * 256.

successful?(process_exit)

@spec successful?(t()) :: boolean()

Returns true when the normalized exit represents success.