mirror of
https://github.com/containers/youki
synced 2024-06-10 16:56:17 +02:00
deprecate crossbeam since it is merged with std
Signed-off-by: yihuaf <yihuaf@unkies.org>
This commit is contained in:
parent
4ba681f012
commit
32f57e5b5c
|
@ -1941,17 +1941,14 @@ dependencies = [
|
||||||
"caps",
|
"caps",
|
||||||
"chrono",
|
"chrono",
|
||||||
"clone3",
|
"clone3",
|
||||||
"crossbeam-channel",
|
|
||||||
"fastrand",
|
"fastrand",
|
||||||
"futures",
|
"futures",
|
||||||
"libc",
|
"libc",
|
||||||
"libcgroups",
|
"libcgroups",
|
||||||
"libseccomp",
|
"libseccomp",
|
||||||
"mio",
|
|
||||||
"nix",
|
"nix",
|
||||||
"oci-spec",
|
"oci-spec",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"path-clean 1.0.1",
|
|
||||||
"prctl",
|
"prctl",
|
||||||
"procfs",
|
"procfs",
|
||||||
"quickcheck",
|
"quickcheck",
|
||||||
|
@ -1962,7 +1959,6 @@ dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serial_test",
|
"serial_test",
|
||||||
"syscalls",
|
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tracing",
|
"tracing",
|
||||||
|
@ -2158,7 +2154,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "eebffdb73fe72e917997fad08bdbf31ac50b0fa91cec93e69a0662e4264d454c"
|
checksum = "eebffdb73fe72e917997fad08bdbf31ac50b0fa91cec93e69a0662e4264d454c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"log",
|
|
||||||
"wasi 0.11.0+wasi-snapshot-preview1",
|
"wasi 0.11.0+wasi-snapshot-preview1",
|
||||||
"windows-sys 0.48.0",
|
"windows-sys 0.48.0",
|
||||||
]
|
]
|
||||||
|
@ -2438,12 +2433,6 @@ version = "0.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ecba01bf2678719532c5e3059e0b5f0811273d94b397088b82e3bd0a78c78fdd"
|
checksum = "ecba01bf2678719532c5e3059e0b5f0811273d94b397088b82e3bd0a78c78fdd"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "path-clean"
|
|
||||||
version = "1.0.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "peeking_take_while"
|
name = "peeking_take_while"
|
||||||
version = "0.1.2"
|
version = "0.1.2"
|
||||||
|
@ -3289,17 +3278,6 @@ dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "serde_repr"
|
|
||||||
version = "0.1.12"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"syn 2.0.16",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_urlencoded"
|
name = "serde_urlencoded"
|
||||||
version = "0.7.1"
|
version = "0.7.1"
|
||||||
|
@ -3558,17 +3536,6 @@ dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "syscalls"
|
|
||||||
version = "0.6.12"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "41a292bad4a4fdbab06bb5399d2d578e4afed89e6701b47a75cf952d510c1473"
|
|
||||||
dependencies = [
|
|
||||||
"cc",
|
|
||||||
"serde",
|
|
||||||
"serde_repr",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "system-interface"
|
name = "system-interface"
|
||||||
version = "0.25.7"
|
version = "0.25.7"
|
||||||
|
@ -5034,7 +5001,7 @@ dependencies = [
|
||||||
"lexical-sort",
|
"lexical-sort",
|
||||||
"memmap2",
|
"memmap2",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"path-clean 0.1.0",
|
"path-clean",
|
||||||
"rand",
|
"rand",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_cbor",
|
"serde_cbor",
|
||||||
|
|
|
@ -24,13 +24,10 @@ test_utils = ["dep:rand"]
|
||||||
bitflags = "2.3.1"
|
bitflags = "2.3.1"
|
||||||
caps = "0.5.5"
|
caps = "0.5.5"
|
||||||
chrono = { version = "0.4", default-features = false, features = ["clock", "serde"] }
|
chrono = { version = "0.4", default-features = false, features = ["clock", "serde"] }
|
||||||
crossbeam-channel = "0.5"
|
|
||||||
fastrand = "^1.7.0"
|
fastrand = "^1.7.0"
|
||||||
futures = { version = "0.3", features = ["thread-pool"] }
|
futures = { version = "0.3", features = ["thread-pool"] }
|
||||||
libc = "0.2.144"
|
libc = "0.2.144"
|
||||||
mio = { version = "0.8.7", features = ["os-ext", "os-poll"] }
|
|
||||||
nix = "0.26.2"
|
nix = "0.26.2"
|
||||||
path-clean = "1.0.1"
|
|
||||||
oci-spec = { version = "^0.6.0", features = ["runtime"] }
|
oci-spec = { version = "^0.6.0", features = ["runtime"] }
|
||||||
once_cell = "1.17.1"
|
once_cell = "1.17.1"
|
||||||
procfs = "0.15.1"
|
procfs = "0.15.1"
|
||||||
|
@ -39,7 +36,6 @@ libcgroups = { version = "0.0.5", path = "../libcgroups", default-features = fal
|
||||||
libseccomp = { version = "0.3.0", optional=true }
|
libseccomp = { version = "0.3.0", optional=true }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
syscalls = "0.6.12"
|
|
||||||
rust-criu = "0.4.0"
|
rust-criu = "0.4.0"
|
||||||
clone3 = "0.2.3"
|
clone3 = "0.2.3"
|
||||||
regex = "1.8.3"
|
regex = "1.8.3"
|
||||||
|
|
|
@ -98,14 +98,14 @@ pub fn run_hooks(hooks: Option<&Vec<Hook>>, container: Option<&Container>) -> Re
|
||||||
// use pid to identify the process and send a kill signal. This
|
// use pid to identify the process and send a kill signal. This
|
||||||
// is what the Command.kill() does under the hood anyway. When
|
// is what the Command.kill() does under the hood anyway. When
|
||||||
// timeout, we have to kill the process and clean up properly.
|
// timeout, we have to kill the process and clean up properly.
|
||||||
let (s, r) = crossbeam_channel::unbounded();
|
let (s, r) = std::sync::mpsc::channel();
|
||||||
thread::spawn(move || {
|
thread::spawn(move || {
|
||||||
let res = hook_process.wait();
|
let res = hook_process.wait();
|
||||||
let _ = s.send(res);
|
let _ = s.send(res);
|
||||||
});
|
});
|
||||||
match r.recv_timeout(time::Duration::from_secs(timeout_sec as u64)) {
|
match r.recv_timeout(time::Duration::from_secs(timeout_sec as u64)) {
|
||||||
Ok(res) => res,
|
Ok(res) => res,
|
||||||
Err(crossbeam_channel::RecvTimeoutError::Timeout) => {
|
Err(std::sync::mpsc::RecvTimeoutError::Timeout) => {
|
||||||
// Kill the process. There is no need to further clean
|
// Kill the process. There is no need to further clean
|
||||||
// up because we will be error out.
|
// up because we will be error out.
|
||||||
let _ = signal::kill(hook_process_pid, signal::Signal::SIGKILL);
|
let _ = signal::kill(hook_process_pid, signal::Signal::SIGKILL);
|
||||||
|
|
Loading…
Reference in New Issue