Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
Development · Evolving reference

ProcessCommand

Owns explicit subprocess executable, cwd, arguments and environment. Constructor/move transfer backing without launching, allocating or capturing host state. Arguments include explicit argv0; empty environment means empty. No PATH search, implicit shell, quoting or Unicode normalization occurs. Native admission validates absolute paths/representation/limits at execution. Moving or destroying this command invalidates views/references into it; externally synchronize edits and synchronous execution. Async execution consumes ownership.

Sn is under heavy development. This reference includes the intended 1.0 design; features may be incomplete in the current compiler. Read the status →

Module std.process

import std.process;

Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.

ProcessCommand

pub final class ProcessCommand

Owns explicit subprocess executable, cwd, arguments and environment. Constructor/move transfer backing without launching, allocating or capturing host state. Arguments include explicit argv0; empty environment means empty. No PATH search, implicit shell, quoting or Unicode normalization occurs. Native admission validates absolute paths/representation/limits at execution. Moving or destroying this command invalidates views/references into it; externally synchronize edits and synchronous execution. Async execution consumes ownership.

ProcessCommand.init

pub init(mut Executable: Path, mut WorkingDirectory: Path, mut Inputs: ProgramInputs, InheritStandardStreams: bool)

Adopts all explicit launch inputs without starting a child. Executable: Owned executable path; native execution requires absolute. WorkingDirectory: Owned explicit absolute child cwd. Inputs: Owned argv/environment payload, including argv0. InheritStandardStreams: Explicit stdio inheritance; default false.

ProcessCommand.init

pub init(mut Executable: Path, mut WorkingDirectory: Path, mut Inputs: ProgramInputs)

Supplies the omitted arguments to init. Note: Defaults: InheritStandardStreams = false. Executable: Same input, ownership and lifetime contract as the full operation. WorkingDirectory: Same input, ownership and lifetime contract as the full operation. Inputs: Same input, ownership and lifetime contract as the full operation.

ProcessCommand.init

pub init(Source: readonly Self&) = delete;

Rejects implicit allocating command copies. Source: Existing owner.

ProcessCommand.init

pub init(Source: mut Self&&)

Transfers backing without launch/allocation. Source: Owner left with inert nested backing.

ProcessCommand.operator

pub fn operator =(Source: readonly Self&) -> void = delete;

Rejects implicit allocating command copies. Source: Existing owner. Return: No runtime result; this assignment is deleted and cannot be invoked.

ProcessCommand.operator

pub fn operator =(Source: mut Self&&) -> void

Replaces owned backing without launching or waiting. Source: Owner left inert except exact self-move. Return: No value after replacing stored paths, inputs and stream-selection state.

ProcessCommand.Executable

pub Executable: PathView;

Borrows exact executable units bounded by command backing.

ProcessCommand.WorkingDirectory

pub WorkingDirectory: PathView;

Borrows exact working-directory units bounded by command backing.

ProcessCommand.InheritStandardStreams

pub InheritStandardStreams: bool;

Observes explicit stdio inheritance policy without native access.

ProcessCommand.ChangeStandardStreamInheritance

pub fn ChangeStandardStreamInheritance(Enabled: bool) -> void

Changes only future executions' stdio selection. Enabled: True to inherit descriptors0–2; false selects null streams. Return: No value after storing the stream policy for subsequent executions.

ProcessCommand.Inputs

pub readonly fn Inputs() -> readonly ProgramInputs&

Borrows immutable argv/environment ownership without copying. Return: Reference bounded by command movement/destruction.

ProcessCommand.Inputs

pub fn Inputs() -> mut ProgramInputs&

Borrows argv/environment ownership for checked edits. Return: Writable reference bounded by command movement/destruction; inner views follow their owning argument/environment stability contracts.

Documentation snapshot: October 24, 2026 About versions ↗
Searching Development · language & standard library