Skip to content

Commit

Permalink
- remove unnecessary dep
Browse files Browse the repository at this point in the history
- fix windows compilation
  • Loading branch information
yellowhatter committed Sep 17, 2024
1 parent ae06310 commit a560954
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion commons/zenoh-shm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
8 changes: 7 additions & 1 deletion commons/zenoh-shm/src/cleanup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a560954

Please sign in to comment.