From ab0225e02f09e705dda0934e9f6653c213468fa7 Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Mon, 26 Aug 2024 19:05:39 +0100 Subject: [PATCH] Signal hook only on non-Windows --- crates/rqbit/src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/rqbit/src/main.rs b/crates/rqbit/src/main.rs index 294cb15..00d53ce 100644 --- a/crates/rqbit/src/main.rs +++ b/crates/rqbit/src/main.rs @@ -359,6 +359,7 @@ fn main() -> anyhow::Result<()> { .build()?; let token = tokio_util::sync::CancellationToken::new(); + #[cfg(not(target_os = "windows"))] { let token = token.clone(); use signal_hook::{consts::SIGINT, consts::SIGTERM, iterator::Signals};