pub fn try_set_handler<F>(user_handler: F) -> Result<(), Error>where
    F: FnMut() + 'static + Send,
Expand description

The same as ctrlc::set_handler but errors if a handler already exists for the signal(s).

Errors

Will return an error if another handler exists or if a system error occurred while setting the handler.