Skip to main content

harn_hostlib/process/
mod.rs

1//! Process abstraction used by the deterministic process tools.
2//!
3//! Production code spawns through [`spawn_process`], which dispatches to
4//! the [`ProcessSpawner`] currently installed via
5//! [`install_spawner`]. The default spawner ([`real::default_spawner`])
6//! goes through `harn_vm::process_sandbox`. Tests install
7//! [`mock::MockSpawner`] to drive process behaviour deterministically.
8
9pub mod handle;
10pub mod mock;
11pub mod owner_death;
12pub mod real;
13#[cfg(target_os = "windows")]
14mod windows;
15
16pub use handle::{
17    current_spawner, install_spawner, spawn_process, EnvMode, ExitStatus, OutputCapture,
18    OwnerDeathPolicy, ProcessCleanupChild, ProcessCleanupReport, ProcessError, ProcessHandle,
19    ProcessKiller, ProcessSpawner, SpawnSpec, SpawnerGuard, WaitOutcome,
20};
21pub use mock::{MockHandleController, MockProcess, MockProcessConfig, MockSpawner};
22pub use real::default_spawner;
23#[cfg(unix)]
24pub use real::replace_current_process;
25#[cfg(target_os = "windows")]
26pub use windows::KillOnCloseJob;