Skip to main content

forward

Function forward 

Source
pub fn forward(
    cmd: Command,
    stream: &mut Stream<'_>,
    out: &mut impl Write,
) -> Result<ExitStatus>
Expand description

Run cmd, forwarding each event to out as the runner writes it, and return its exit status. The runner’s stderr is collected on a thread, so a full pipe cannot stall it. If out stops accepting output (a consumer that went away), the runner is killed rather than left running.