Skip to content

Commit 66e513a

Browse files
committed
Fix containerd shim
Signed-off-by: Maksym Pavlenko <[email protected]>
1 parent 798ab74 commit 66e513a

File tree

1 file changed

+1
-3
lines changed
  • crates/shim/src/synchronous

1 file changed

+1
-3
lines changed

crates/shim/src/synchronous/mod.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ cfg_unix! {
8989
use signal_hook::iterator::Signals;
9090
use std::os::unix::fs::FileTypeExt;
9191
use std::{convert::TryFrom, fs, path::Path};
92-
use std::os::fd::AsRawFd;
9392
}
9493

9594
cfg_windows! {
@@ -499,7 +498,7 @@ pub fn spawn(opts: StartOpts, grouping: &str, vars: Vec<(&str, &str)>) -> Result
499498
.stdin(Stdio::null())
500499
.stderr(Stdio::null())
501500
.fd_mappings(vec![FdMapping {
502-
parent_fd: _listener.as_raw_fd(),
501+
parent_fd: _listener.into(),
503502
child_fd: SOCKET_FD,
504503
}])?;
505504

@@ -508,7 +507,6 @@ pub fn spawn(opts: StartOpts, grouping: &str, vars: Vec<(&str, &str)>) -> Result
508507
.map_err(io_error!(e, "spawn shim"))
509508
.map(|child| {
510509
// Ownership of `listener` has been passed to child.
511-
std::mem::forget(_listener);
512510
(child.id(), address)
513511
})
514512
}

0 commit comments

Comments
 (0)