pub async fn signal(sig: i32) -> Result<()>
Available on Unix only.
Expand description
Creates a new listener which will receive notifications when the current process receives the specified signal.
The first call to this method spawns a thread to execute the signal handlers.