pub(crate) fn read_fd_to_end(
fd: &OwnedFd,
idle: Duration,
) -> Result<Vec<u8>, String>Expand description
Read fd to EOF. The deadline is per-chunk (idle), so a large transfer that
keeps flowing is never cut off while a stalled writer still errors out.