Import with #import "std/process".

ProcessRequest :: struct { executable: string; cwd: string; stdin: string; credential_name: string; credential_value: string; isolate_desktop: bool; timeout_ms: s64; }

A line-oriented child-process capability. The host receives explicit arguments, stdin, and one optional secret environment binding. Hosts must honor isolate_desktop before starting any child. Handles are host-owned; callers consume lines and then wait exactly once.

ProcessStart :: struct { handle: s32; error: string; }
ProcessLine :: struct { text: string; eof: bool; error: string; }
ProcessExit :: struct { code: s32; stderr: string; error: string; }
Start :: (request: ProcessRequest, args: []string) -> ProcessStart

Needs a host capability.

NextLine :: (handle: s32) -> ProcessLine

Needs a host capability.

Wait :: (handle: s32) -> ProcessExit

Needs a host capability.

Source ↗ · All modules