Skip to main content

Module process

Module process 

Source
Expand description

Process abstraction used by the deterministic process tools.

Production code spawns through spawn_process, which dispatches to the ProcessSpawner currently installed via install_spawner. The default spawner (real::default_spawner) goes through harn_vm::process_sandbox. Tests install mock::MockSpawner to drive process behaviour deterministically.

Re-exports§

pub use handle::current_spawner;
pub use handle::install_spawner;
pub use handle::spawn_process;
pub use handle::EnvMode;
pub use handle::ExitStatus;
pub use handle::ProcessError;
pub use handle::ProcessHandle;
pub use handle::ProcessKiller;
pub use handle::ProcessSpawner;
pub use handle::SpawnSpec;
pub use handle::SpawnerGuard;
pub use mock::MockHandleController;
pub use mock::MockProcess;
pub use mock::MockProcessConfig;
pub use mock::MockSpawner;
pub use real::default_spawner;

Modules§

handle
Process abstraction trait used by tools/proc and tools/long_running.
mock
Test-only ProcessSpawner / ProcessHandle implementations.
real
Production ProcessSpawner implementation backed by std::process::Command + harn_vm::process_sandbox.