Function glib::source::unix_signal_source_new
source · pub fn unix_signal_source_new<F>(
signum: i32,
name: Option<&str>,
priority: Priority,
func: F
) -> Source
Available on Unix only.
Expand description
Adds a closure to be called by the main loop the returned Source
is attached to whenever a
UNIX signal is raised.
func
will be called repeatedly every time signum
is raised until it
returns ControlFlow::Break
.