Skip to main content

run

Function run 

Source
pub fn run<I, S>(
    program: impl AsRef<OsStr>,
    args: I,
    options: &RunOptions,
) -> Result<RunOutput>
where I: IntoIterator<Item = S>, S: AsRef<OsStr>,
Expand description

Runs program with args to completion or until options.timeout, then returns its status and bounded output. Fails when the program or native output capture cannot start, or lifecycle waiting fails. A non-zero exit is a normal Ok with status set, provided capture reaches EOF & cleanup succeeds. Drain expiry is Err(TimedOut) carrying RunnerPhase::Drain, including after an execution timeout or successful leader exit. Errors carry RunnerFailure; use its source for the original OS error code.