Registry / utility / simple-signal

simple-signal

JSON →
library1.1.1rscratesunverified

Easy Unix signal handling for Rust projects.

# Cargo.toml [dependencies] simple-signal = "1.1.1"
INSTALL
IMPORT
SIG · SIMPLE-SIGNAL
S
simple-signal
utilityrustv1.1.1
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 simple_signal::Signal;

Sets a handler for SIGINT that prints a message and exits.

use simple_signal::{Signal, set_handler}; fn main() { set_handler(&[Signal::Int], || { println!("Received SIGINT, exiting"); std::process::exit(0); }); loop {} }
Debug
Known issues
gotchaOnly works on Unix-like systems
fix
Use conditional compilation or platform-specific alternatives
affects: >=1.0.0
Upgrade
Version history
1.1.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
simple-signal — cargo add simple-signal · libregistry