Exit gracefully on SIGTERM

* Exit gracefully on `SIGTERM`

Save current state and close ncspot on `SIGTERM`

Fixes #948

* Disable signal handling on non-UNIX platforms
This commit is contained in:
Henrik Friedrichsen
2022-10-03 00:07:40 +02:00
committed by GitHub
parent 222b41c9cf
commit b1f1c20484
3 changed files with 21 additions and 0 deletions

1
Cargo.lock generated
View File

@@ -1589,6 +1589,7 @@ dependencies = [
"serde",
"serde_cbor",
"serde_json",
"signal-hook",
"strum 0.24.1",
"strum_macros 0.24.3",
"tokio",