Registry / async / tokio-signal

tokio-signal

JSON →
library0.2.9rscratesunverified

Asynchronous Unix signal handling backed by futures, part of the Tokio ecosystem.

# Cargo.toml [dependencies] tokio-signal = "0.2.9"
INSTALL
IMPORT
SIG · TOKIO-SIGNAL
T
tokio-signal
asyncrustv0.2.9
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Signal
use tokio_signal::unix::Signal;

Listen for SIGINT signal asynchronously.

use tokio_signal::unix::{Signal, SIGINT}; use futures::Future; fn main() { let signal = Signal::new(SIGINT).flatten_stream().take(1).collect(); tokio::run(signal.map(|_| println!("Received SIGINT"))); }
Debug
Known issues
breakingThis crate is deprecated; use `tokio::signal` from the main Tokio crate instead.
fix
Replace `tokio-signal` with `tokio::signal` (requires Tokio 0.2+).
affects: >=0.2.0
Upgrade
Version history
0.2.9latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
42 hits · last 30 days
node
36
OpenAI (training)
1
Resources
tokio-signal — cargo add tokio-signal · libregistry