pub fn output_with_timeout(
cmd: &mut Command,
timeout: Duration,
) -> Result<Output>Expand description
Spawn cmd in its own process group with piped stdout/stderr.
Kills the entire group on timeout so ssh + credential helpers are also reaped.
Joins reader threads after kill to prevent thread leaks.