Enumerable for process output with additional process-specific properties.
Extends Enumerable<Uint8Array> with process management capabilities.
Use .lines property to get line-based output, or iterate over raw bytes.
Important: Always consume the process output (via .lines.collect(),
.lines.forEach(), etc.) or the process will leak resources.
Error Handling: Processes that exit with non-zero codes throw
ExitCodeError when you consume their output. Wrap in try-catch to handle.
Basic usage
Basic usage
import { run } from "jsr:@j50n/proc"; const lines = await run("ls", "-la").lines.collect();
pid: number
Process PID.
status: Promise<Deno.CommandStatus>
Process exit status.
Important: This is a property that returns a Promise, not a method.
Use await p.status not await p.status().
The Promise resolves when the process exits. You should consume the process output before or concurrently with checking status to avoid resource leaks.