Module proc_launcher

Module proc_launcher 

Source
Expand description

Proc launching abstraction.

This module defines a small strategy interface, ProcLauncher, used by BootstrapProcManager to start and stop procs while keeping lifecycle tracking centralized in the manager.

A launcher is responsible for the mechanics of running a proc (native OS process, container, VM, etc.) and for reporting terminal status back to the manager.

§Key properties

  • Readiness is callback-driven. A proc is considered ready only when it signals readiness via the existing bootstrap callback (callback_addr) in the [Bootstrap] payload. Launchers do not determine readiness.
  • Terminal status is channel-driven. launch returns a LaunchResult whose exit_rx resolves exactly once with a ProcExitResult. This channel is the single source of truth for how a proc ended.
  • Termination is initiation-only. ProcLauncher::terminate and ProcLauncher::kill initiate shutdown and return without waiting for the proc to exit; callers observe completion by awaiting exit_rx (or a higher level handle built on it).

§Stdio handling

StdioHandling describes whether stdout/stderr are made available to the manager for forwarding and tail collection (Captured), inherited (Inherited), or handled entirely by the launcher (ManagedByLauncher).

Structs§

LaunchOptions
Per-launch policy computed by the manager and handed to the launcher.
LaunchResult
Result of launching a proc.
ProcExitResult
Terminal status of a proc.

Enums§

ProcExitKind
How a proc terminated.
ProcLauncherError
Errors produced by proc launching / termination backends.
StdioHandling
How proc stdio is handled.

Traits§

ProcLauncher
Strategy interface for launching and stopping a proc.

Functions§

format_process_name
Format a human-readable process name for diagnostics and logs.