diff --git a/Cargo.lock b/Cargo.lock index c5131b4f..bf5c3867 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -733,9 +733,13 @@ version = "0.1.0" dependencies = [ "anyhow", "ctor", + "futures", "libc", "log", "nix", + "once_cell", + "signal-hook", + "signal-hook-tokio", "tokio", ] @@ -4132,6 +4136,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" +[[package]] +name = "signal-hook" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +dependencies = [ + "libc", + "signal-hook-registry", +] + [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -4141,6 +4155,18 @@ dependencies = [ "libc", ] +[[package]] +name = "signal-hook-tokio" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213241f76fb1e37e27de3b6aa1b068a2c333233b59cca6634f634b80a27ecf1e" +dependencies = [ + "futures-core", + "libc", + "signal-hook", + "tokio", +] + [[package]] name = "signature" version = "1.6.4" diff --git a/crates/cpu_timer/Cargo.toml b/crates/cpu_timer/Cargo.toml index d16317ea..c93fa5d5 100644 --- a/crates/cpu_timer/Cargo.toml +++ b/crates/cpu_timer/Cargo.toml @@ -11,4 +11,8 @@ libc = { workspace = true } nix = { version = "0.26.2", features = ["signal"] } tokio = { workspace = true } log = { workspace = true } -ctor = { version = "0.2.6" } \ No newline at end of file +ctor = { version = "0.2.6" } +futures = { workspace = true } +signal-hook = { version = "0.3.17" } +signal-hook-tokio = { version = "0.3.1", features = ["futures-v0_3"] } +once_cell = { workspace = true } \ No newline at end of file