Signal hook only on non-Windows

This commit is contained in:
Igor Katson 2024-08-26 19:05:39 +01:00
parent 33a171147d
commit ab0225e02f
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5

View file

@ -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};