Function command_pipe_to_file

Source
pub fn command_pipe_to_file(
    command: &mut Command,
    piped: &mut Command,
    file: File,
) -> Result<(), Error>
Expand description

Pipe stdout of command to stdin of piped command and pipe stdout of piped to file

ยงErrors

command_pipe_to_file can result in std::io::Error

  • when spawn or wait fail
  • when there is an issue with the stdout / stdin pipe (std::io::ErrorKind::BrokenPipe)