Skip to main content

signal

Function signal 

Source
#[unsafe(no_mangle)]
pub extern "C" fn signal( sig: c_int, func: Option<extern "C" fn(c_int)>, ) -> Option<extern "C" fn(c_int)>
Expand description

See https://pubs.opengroup.org/onlinepubs/9799919799/functions/signal.html.

Chooses one of three ways in which receipt of the signal number sig is to be subsequently handled.

Upon success, returns the value of func for the most recent call to signal() for the specified signal sig.Upon failure, returns SIG_ERR and a positive value shall be stored in errno.