Skip to main content

run

Function run 

Source
pub fn run(cmd: &str, args: &[&str], opts: &RunOptions) -> Result<RunResult>
Expand description

Runs a command with RunOptions and returns RunResult.

On timeout the child is SIGTERMed and, if it does not exit within [SIGTERM_GRACE], SIGKILLed. run itself never fails on timeout: it returns RunResult with RunResult::timed_out set and RunResult::status = TIMEOUT_STATUS. run_expect_success turns that into Error::CommandTimedOut.