From a560954d8c8d4ce5e2acd19fab4a184cc4fcb789 Mon Sep 17 00:00:00 2001 From: yellowhatter Date: Sun, 15 Sep 2024 14:11:04 +0300 Subject: [PATCH] - remove unnecessary dep - fix windows compilation --- Cargo.lock | 1 - commons/zenoh-shm/Cargo.toml | 1 - commons/zenoh-shm/src/cleanup.rs | 8 +++++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 221c5280a7..3ebe1688e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5852,7 +5852,6 @@ version = "1.0.0-dev" dependencies = [ "async-trait", "crc", - "futures", "libc", "lockfree", "num-traits", diff --git a/commons/zenoh-shm/Cargo.toml b/commons/zenoh-shm/Cargo.toml index ba219bc034..c5b2a0a628 100644 --- a/commons/zenoh-shm/Cargo.toml +++ b/commons/zenoh-shm/Cargo.toml @@ -49,7 +49,6 @@ thread-priority = { workspace = true } lockfree = { workspace = true } stabby = { workspace = true } signal-hook = { workspace = true } -futures = { workspace = true } [dev-dependencies] libc = { workspace = true } diff --git a/commons/zenoh-shm/src/cleanup.rs b/commons/zenoh-shm/src/cleanup.rs index c86106107f..0b22d2b1c2 100644 --- a/commons/zenoh-shm/src/cleanup.rs +++ b/commons/zenoh-shm/src/cleanup.rs @@ -29,7 +29,13 @@ impl Cleanup { fn new() -> Self { // todo: this is a workaround to make sure Cleanup will be executed even if process terminates via signal handlers // that execute std::terminate instead of exit - for signal in [SIGHUP, SIGTERM, SIGINT, SIGQUIT] { + for signal in [ + SIGHUP, + SIGTERM, + SIGINT, + #[cfg(not(target_os = "windows"))] + SIGQUIT, + ] { unsafe { let _ = signal_hook::low_level::register(signal, || { std::process::exit(0);