diff --git a/Cargo.lock b/Cargo.lock index d9dd09096541ae..6c85dbf765bbf3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -990,9 +990,9 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.2.1" +version = "3.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19c6cedffdc8c03a3346d723eb20bd85a13362bb96dc2ac000842c6381ec7bf" +checksum = "232295399409a8b7ae41276757b5a1cc21032848d42bff2352261f958b3ca29a" dependencies = [ "nix", "winapi 0.3.9", @@ -2469,9 +2469,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.6.4" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" +checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" dependencies = [ "autocfg 1.0.0", ] @@ -2603,15 +2603,14 @@ dependencies = [ [[package]] name = "nix" -version = "0.23.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f305c2c2e4c39a82f7bf0bf65fb557f9070ce06781d4f2454295cc34b1c43188" +checksum = "fa9b4819da1bc61c0ea48b63b7bc8604064dd43013e7cc325df098d49cd7c18a" dependencies = [ "bitflags", "cc", "cfg-if 1.0.0", "libc", - "memoffset", ] [[package]] diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 52752dea4f356c..2325adc00b708e 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -14,7 +14,7 @@ bincode = "1.3.3" bs58 = "0.4.0" clap = "2.33.1" criterion-stats = "0.3.0" -ctrlc = { version = "3.2.1", features = ["termination"] } +ctrlc = { version = "3.1.9", features = ["termination"] } console = "0.14.1" const_format = "0.2.21" log = "0.4.14" diff --git a/install/Cargo.toml b/install/Cargo.toml index 63dbba0a7df60a..af28ac46c8b247 100644 --- a/install/Cargo.toml +++ b/install/Cargo.toml @@ -16,11 +16,11 @@ bzip2 = "0.4.3" chrono = { version = "0.4.11", features = ["serde"] } clap = { version = "2.33.1" } console = "0.14.1" -ctrlc = { version = "3.2.1", features = ["termination"] } +ctrlc = { version = "3.1.9", features = ["termination"] } dirs-next = "2.0.0" indicatif = "0.16.2" lazy_static = "1.4.0" -nix = "0.23.0" +nix = "0.20.0" reqwest = { version = "0.11.5", default-features = false, features = ["blocking", "rustls-tls", "json"] } serde = { version = "1.0.130", features = ["derive"] } serde_yaml = "0.8.21" diff --git a/install/src/stop_process.rs b/install/src/stop_process.rs index 1829837cbc5ca2..2a888f99dae39d 100644 --- a/install/src/stop_process.rs +++ b/install/src/stop_process.rs @@ -1,4 +1,5 @@ -use std::{io, process::Child}; +use std::io; +use std::process::Child; fn kill_process(process: &mut Child) -> Result<(), io::Error> { if let Ok(()) = process.kill() { @@ -16,18 +17,13 @@ pub fn stop_process(process: &mut Child) -> Result<(), io::Error> { #[cfg(not(windows))] pub fn stop_process(process: &mut Child) -> Result<(), io::Error> { - use { - nix::{ - errno::Errno::{EINVAL, EPERM, ESRCH}, - sys::signal::{kill, Signal}, - unistd::Pid, - }, - std::{ - io::ErrorKind, - thread, - time::{Duration, Instant}, - }, - }; + use nix::errno::Errno::{EINVAL, EPERM, ESRCH}; + use nix::sys::signal::{kill, Signal}; + use nix::unistd::Pid; + use nix::Error::Sys; + use std::io::ErrorKind; + use std::thread; + use std::time::{Duration, Instant}; let nice_wait = Duration::from_secs(5); let pid = Pid::from_raw(process.id() as i32); @@ -44,17 +40,17 @@ pub fn stop_process(process: &mut Child) -> Result<(), io::Error> { kill_process(process)?; } } - Err(EINVAL) => { + Err(Sys(EINVAL)) => { println!("Invalid signal. Killing process {}", pid); kill_process(process)?; } - Err(EPERM) => { + Err(Sys(EPERM)) => { return Err(io::Error::new( ErrorKind::InvalidInput, format!("Insufficient permissions to signal process {}", pid), )); } - Err(ESRCH) => { + Err(Sys(ESRCH)) => { return Err(io::Error::new( ErrorKind::InvalidInput, format!("Process {} does not exist", pid), diff --git a/net-utils/Cargo.toml b/net-utils/Cargo.toml index 2a1317e81ba8c9..e12cb55869dfc9 100644 --- a/net-utils/Cargo.toml +++ b/net-utils/Cargo.toml @@ -13,7 +13,7 @@ edition = "2018" bincode = "1.3.3" clap = "2.33.1" log = "0.4.14" -nix = "0.23.0" +nix = "0.20.0" rand = "0.7.0" serde = "1.0.130" serde_derive = "1.0.103" diff --git a/programs/bpf/Cargo.lock b/programs/bpf/Cargo.lock index 73432cd473ad48..7fdd520576c648 100644 --- a/programs/bpf/Cargo.lock +++ b/programs/bpf/Cargo.lock @@ -1499,9 +1499,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.6.4" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" +checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" dependencies = [ "autocfg", ] @@ -1557,15 +1557,14 @@ dependencies = [ [[package]] name = "nix" -version = "0.23.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f305c2c2e4c39a82f7bf0bf65fb557f9070ce06781d4f2454295cc34b1c43188" +checksum = "fa9b4819da1bc61c0ea48b63b7bc8604064dd43013e7cc325df098d49cd7c18a" dependencies = [ "bitflags", "cc", "cfg-if 1.0.0", "libc", - "memoffset", ] [[package]] diff --git a/streamer/Cargo.toml b/streamer/Cargo.toml index 395c4aef9d75cd..f88baa46732b3a 100644 --- a/streamer/Cargo.toml +++ b/streamer/Cargo.toml @@ -17,7 +17,7 @@ solana-sdk = { path = "../sdk", version = "=1.9.0" } thiserror = "1.0" solana-logger = { path = "../logger", version = "=1.9.0" } libc = "0.2.103" -nix = "0.23.0" +nix = "0.20.0" solana-perf = { path = "../perf", version = "=1.9.0" } [dev-dependencies] diff --git a/sys-tuner/Cargo.toml b/sys-tuner/Cargo.toml index 681630193d5854..f65a9c8dc5de50 100644 --- a/sys-tuner/Cargo.toml +++ b/sys-tuner/Cargo.toml @@ -20,7 +20,7 @@ solana-version = { path = "../version", version = "=1.9.0" } [target."cfg(unix)".dependencies] unix_socket2 = "0.5.4" users = "0.10.0" -nix = "0.23.0" +nix = "0.20.0" sysctl = "0.4.2" [lib] diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml index bc70ae5496a67e..ae303f7727f56a 100644 --- a/tokens/Cargo.toml +++ b/tokens/Cargo.toml @@ -14,7 +14,7 @@ chrono = { version = "0.4", features = ["serde"] } clap = "2.33.0" console = "0.14.1" csv = "1.1.6" -ctrlc = { version = "3.2.1", features = ["termination"] } +ctrlc = { version = "3.1.9", features = ["termination"] } indexmap = "1.7.0" indicatif = "0.16.2" pickledb = "0.4.1"