Child Process¶
Import: import system.process;
Read the process guide for launch settings, cancellation, and streaming ownership.
ChildProcess¶
Owns a child and its pipes; explicit close terminates and reaps unfinished work.
stdout¶
Borrows stdout through an AsyncReader; retain this reader when using read_line buffering.
stderr¶
Borrows stderr through an AsyncReader; drain it concurrently with stdout.
stdin¶
Borrows stdin through an AsyncWriter; call close_stdin to deliver EOF to the child.
close_stdin¶
Closes stdin after pending writes, allowing commands waiting for input EOF to finish.
public fun close_stdin(
token: Option<CancellationToken> = Option.None
): Future<Result<Unit, ProcessError>>
wait¶
Waits for process exit without discarding unread output or closing the child handle.
close¶
Terminates and reaps the owned child; repeated or concurrent closes share the outcome.