async fn spool(
stream: Option<impl AsyncRead + Unpin>,
file: File,
) -> Result<Option<Error>>Expand description
Copy a command stream to its file. A failed write, such as a full temporary directory, is returned and the rest is drained, so storing output never blocks or breaks the command.