diff --git a/lib/src/tar/write.rs b/lib/src/tar/write.rs index 29221e9b..67e2efa1 100644 --- a/lib/src/tar/write.rs +++ b/lib/src/tar/write.rs @@ -417,6 +417,8 @@ pub async fn write_tar( let mut c = tokio::process::Command::from(c); c.kill_on_drop(true); let mut r = c.spawn()?; + // Ensure the fd is open until the process is spawned + drop(repofd); tracing::trace!("Spawned ostree child process"); // Safety: We passed piped() for all of these let child_stdin = r.stdin.take().unwrap();