Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

tar/write: Ensure repofd outlives child spawn #676

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/src/tar/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading