<preclass='rust fn'>pub fn unix_signal_add<F>(signum: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, func: F) -><aclass="struct"href="../../glib/source/struct.SourceId.html"title="struct glib::source::SourceId">SourceId</a><spanclass="where fmt-newline">where<br> F: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html"title="trait core::ops::function::FnMut">FnMut</a>() -><aclass="struct"href="../../glib/source/struct.Continue.html"title="struct glib::source::Continue">Continue</a> + <aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html"title="trait core::marker::Send">Send</a> + 'static, </span></pre><divclass='docblock'><p>Adds a closure to be called by the default main loop whenever a UNIX signal is raised.</p>
<p><code>func</code> will be called repeatedly every time <code>signum</code> is raised until it
returns <code>Continue(false)</code>.</p>
<p>The default main loop almost always is the main loop of the main thread.
Thus the closure is called on the main thread.</p>