Skip to content

Commit

Permalink
Use rustix instead of capctl
Browse files Browse the repository at this point in the history
In the interest in having fewer random crates in the
dependency graph.
  • Loading branch information
cgwalters committed May 23, 2023
1 parent b6459a4 commit df4ae8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ rust-version = "1.58.0"

[dependencies]
anyhow = "1.0"
capctl = "0.2.0"
fn-error-context = "0.2.0"
futures-util = "0.3.13"
nix = "0.26"
oci-spec = "0.5.5"
once_cell = "1.9.0"
libc = "0.2"
rustix = { version = "0.37", features = ["process"] }
serde = { features = ["derive"], version = "1.0.125" }
serde_json = "1.0.64"
semver = "1.0.4"
Expand Down
6 changes: 4 additions & 2 deletions src/imageproxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,10 @@ impl TryFrom<ImageProxyConfig> for Command {
let mut c = std::process::Command::new("skopeo");
unsafe {
c.pre_exec(|| {
capctl::prctl::set_pdeathsig(Some(libc::SIGTERM))
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))
rustix::process::set_parent_process_death_signal(Some(
rustix::process::Signal::Term,
))
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))
});
}
c
Expand Down

0 comments on commit df4ae8f

Please sign in to comment.