How would you stream output from a Process?
Although the accepted answer is correct, it doesn’t cover the non-trivial case. To stream output and handle it manually, use Stdio::piped() and manually handle the .stdout property on the child returned from calling spawn, like this: use std::process::{Command, Stdio}; use std::path::Path; use std::io::{BufReader, BufRead}; pub fn exec_stream<P: AsRef<Path>>(binary: P, args: Vec<&’static str>) { let mut … Read more