Skip to content

Commit 031b2f8

Browse files
committed
Avoid allocating in pre_exec closure
Signed-off-by: Alisa Sireneva <[email protected]>
1 parent 67dd086 commit 031b2f8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/imageproxy.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,9 @@ impl TryFrom<ImageProxyConfig> for Command {
279279
let mut c = std::process::Command::new("skopeo");
280280
unsafe {
281281
c.pre_exec(|| {
282-
rustix::process::set_parent_process_death_signal(Some(
282+
Ok(rustix::process::set_parent_process_death_signal(Some(
283283
rustix::process::Signal::TERM,
284-
))
285-
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))
284+
))?)
286285
});
287286
}
288287
c

0 commit comments

Comments
 (0)