Skip to main content

spawn_contained_session

Function spawn_contained_session 

Source
pub fn spawn_contained_session(
    group: &ContainedProcessGroup,
    command: &mut Command,
) -> Result<SpawnedChild>
Expand description

Spawn command as a contained child — its own Job Object (Windows) / process group (Unix), killed when the returned SpawnedChild drops — with all three stdio streams piped, ready to hand to serve_session or run_child_session.

The pipes carry raw bytes (no line splitting), which is what preserves the byte-for-byte fidelity the pump guarantees.

§Errors

Propagates any spawn failure from the sanitized contained-spawn layer.