Skip to main content

run_with_bound

Function run_with_bound 

Source
pub fn run_with_bound<S: AsRef<OsStr>>(
    argv: &[S],
    cwd: Option<&Path>,
    stdin_payload: Option<&[u8]>,
    bound: &OperationBound,
    attempt_cap: Option<Duration>,
) -> Result<BoundedWait, BoundedError>
Expand description

Spawn argv, optionally write stdin_payload, and wait under the operation’s remaining budget and optional attempt cap while draining stdout and stderr concurrently: a child whose output exceeds the pipe capacity would otherwise block writing and never exit, turning a large response or traceback into a timeout.