Adding large folders

This commit is contained in:
2026-02-26 12:00:21 -05:00
parent 5400d82acd
commit 49701c85ad
47332 changed files with 1942573 additions and 0 deletions

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of all items in this crate"><title>List of all items in this crate</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="signal_hook_registry" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">All</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../signal_hook_registry/index.html">signal_<wbr>hook_<wbr>registry</a><span class="version">1.4.8</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h3><a href="#structs">Crate Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><h1>List of all items</h1><rustdoc-toolbar></rustdoc-toolbar></div><h3 id="structs">Structs</h3><ul class="all-items"><li><a href="struct.SigId.html">SigId</a></li></ul><h3 id="functions">Functions</h3><ul class="all-items"><li><a href="fn.register.html">register</a></li><li><a href="fn.register_sigaction.html">register_sigaction</a></li><li><a href="fn.register_signal_unchecked.html">register_signal_unchecked</a></li><li><a href="fn.register_unchecked.html">register_unchecked</a></li><li><a href="fn.unregister.html">unregister</a></li></ul><h3 id="constants">Constants</h3><ul class="all-items"><li><a href="constant.FORBIDDEN.html">FORBIDDEN</a></li></ul></section></div></main></body></html>

View File

@@ -0,0 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of forbidden signals."><title>FORBIDDEN in signal_hook_registry - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="signal_hook_registry" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">FORBIDDEN</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../signal_hook_registry/index.html">signal_<wbr>hook_<wbr>registry</a><span class="version">1.4.8</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">signal_hook_registry</a></div><h1>Constant <span class="constant">FORBIDDEN</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/signal_hook_registry/lib.rs.html#451">Source</a> </span></div><pre class="rust item-decl"><code>pub const FORBIDDEN: &amp;[<a class="type" href="../libc/primitives/type.c_int.html" title="type libc::primitives::c_int">c_int</a>];</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>List of forbidden signals.</p>
<p>Some signals are impossible to replace according to POSIX and some are so special that this
library refuses to handle them (eg. SIGSEGV). The routines panic in case registering one of
these signals is attempted.</p>
<p>See <a href="fn.register.html" title="fn signal_hook_registry::register"><code>register</code></a>.</p>
</div></details></section></div></main></body></html>

View File

@@ -0,0 +1,92 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Registers an arbitrary action for the given signal."><title>register in signal_hook_registry - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="signal_hook_registry" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">register</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../signal_hook_registry/index.html">signal_<wbr>hook_<wbr>registry</a><span class="version">1.4.8</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">register</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#panics" title="Panics">Panics</a></li><li><a href="#errors" title="Errors">Errors</a></li><li><a href="#safety" title="Safety">Safety</a></li><li><a href="#race-condition" title="Race condition">Race condition</a></li><li><a href="#performance" title="Performance">Performance</a></li><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate signal_<wbr>hook_<wbr>registry</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">signal_hook_registry</a></div><h1>Function <span class="fn">register</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/signal_hook_registry/lib.rs.html#574-579">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe fn register&lt;F&gt;(signal: <a class="type" href="../libc/primitives/type.c_int.html" title="type libc::primitives::c_int">c_int</a>, action: F) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.SigId.html" title="struct signal_hook_registry::SigId">SigId</a>, <a class="struct" href="https://doc.rust-lang.org/1.93.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>() + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Registers an arbitrary action for the given signal.</p>
<p>This makes sure theres a signal handler for the given signal. It then adds the action to the
ones called each time the signal is delivered. If multiple actions are set for the same signal,
all are called, in the order of registration.</p>
<p>If there was a previous signal handler for the given signal, it is chained it will be called
as part of this librarys signal handler, before any actions set through this function.</p>
<p>On success, the function returns an ID that can be used to remove the action again with
<a href="fn.unregister.html" title="fn signal_hook_registry::unregister"><code>unregister</code></a>.</p>
<h2 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h2>
<p>If the signal is one of (see <a href="constant.FORBIDDEN.html" title="constant signal_hook_registry::FORBIDDEN"><code>FORBIDDEN</code></a>):</p>
<ul>
<li><code>SIGKILL</code></li>
<li><code>SIGSTOP</code></li>
<li><code>SIGILL</code></li>
<li><code>SIGFPE</code></li>
<li><code>SIGSEGV</code></li>
</ul>
<p>The first two are not possible to override (and the underlying C functions simply ignore all
requests to do so, which smells of possible bugs, or return errors). The rest can be set, but
generally needs very special handling to do so correctly (direct manipulation of the
applications address space, <code>longjmp</code> and similar). Unless you know very well what youre
doing, youll shoot yourself into the foot and this library wont help you with that.</p>
<h2 id="errors"><a class="doc-anchor" href="#errors">§</a>Errors</h2>
<p>Since the library manipulates signals using the low-level C functions, all these can return
errors. Generally, the errors mean something like the specified signal does not exist on the
given platform after a program is debugged and tested on a given OS, it should never return
an error.</p>
<p>However, if an error <em>is</em> returned, there are no guarantees if the given action was registered
or not.</p>
<h2 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h2>
<p>This function is unsafe, because the <code>action</code> is run inside a signal handler. While Rust is
somewhat vague about the consequences of such, it is reasonably to assume that similar
restrictions as specified in C or C++ apply.</p>
<p>In particular:</p>
<ul>
<li>Calling any OS functions that are not async-signal-safe as specified as POSIX is not allowed.</li>
<li>Accessing globals or thread-locals without synchronization is not allowed (however, mutexes
are not within the async-signal-safe functions, therefore the synchronization is limited to
using atomics).</li>
</ul>
<p>The underlying reason is, signals are asynchronous (they can happen at arbitrary time) and are
run in context of arbitrary thread (with some limited control of at which thread they can run).
As a consequence, things like mutexes are prone to deadlocks, memory allocators can likely
contain mutexes and the compiler doesnt expect the interruption during optimizations.</p>
<p>Things that generally are part of the async-signal-safe set (though check specifically) are
routines to terminate the program, to further manipulate signals (by the low-level functions,
not by this library) and to read and write file descriptors. The async-signal-safety is
transitive - that is, a function composed only from computations (with local variables or with
variables accessed with proper synchronizations) and other async-signal-safe functions is also
safe.</p>
<p>As panicking from within a signal handler would be a panic across FFI boundary (which is
undefined behavior), the passed handler must not panic.</p>
<p>Note that many innocently-looking functions do contain some of the forbidden routines (a lot of
things lock or allocate).</p>
<p>If you find these limitations hard to satisfy, choose from the helper functions in the
<a href="https://docs.rs/signal-hook">signal-hook</a> crate these provide safe interface to use some
common signal handling patters.</p>
<h2 id="race-condition"><a class="doc-anchor" href="#race-condition">§</a>Race condition</h2>
<p>Upon registering the first hook for a given signal into this library, theres a short race
condition under the following circumstances:</p>
<ul>
<li>The program already has a signal handler installed for this particular signal (through some
other library, possibly).</li>
<li>Concurrently, some other thread installs a different signal handler while it is being
installed by this library.</li>
<li>At the same time, the signal is delivered.</li>
</ul>
<p>Under such conditions signal-hook might wrongly “chain” to the older signal handler for a short
while (until the registration is fully complete).</p>
<p>Note that the exact conditions of the race condition might change in future versions of the
library. The recommended way to avoid it is to register signals before starting any additional
threads, or at least not to register signals concurrently.</p>
<p>Alternatively, make sure all signals are handled through this library.</p>
<h2 id="performance"><a class="doc-anchor" href="#performance">§</a>Performance</h2>
<p>Even when it is possible to repeatedly install and remove actions during the lifetime of a
program, the installation and removal is considered a slow operation and should not be done
very often. Also, theres limited (though huge) amount of distinct IDs (they are <code>u128</code>).</p>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">extern crate </span>signal_hook_registry;
<span class="kw">use </span>std::io::Error;
<span class="kw">use </span>std::process;
<span class="kw">fn </span>main() -&gt; <span class="prelude-ty">Result</span>&lt;(), Error&gt; {
<span class="kw">let </span>signal = <span class="kw">unsafe </span>{
signal_hook_registry::register(signal_hook::consts::SIGTERM, || process::abort())
}<span class="question-mark">?</span>;
<span class="comment">// Stuff here...
</span>signal_hook_registry::unregister(signal); <span class="comment">// Not really necessary.
</span><span class="prelude-val">Ok</span>(())
}</code></pre></div></div></details></section></div></main></body></html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Register a signal action."><title>register_sigaction in signal_hook_registry - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="signal_hook_registry" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">register_sigaction</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../signal_hook_registry/index.html">signal_<wbr>hook_<wbr>registry</a><span class="version">1.4.8</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">register_<wbr>sigaction</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#safety" title="Safety">Safety</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate signal_<wbr>hook_<wbr>registry</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">signal_hook_registry</a></div><h1>Function <span class="fn">register_<wbr>sigaction</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/signal_hook_registry/lib.rs.html#591-596">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe fn register_sigaction&lt;F&gt;(
signal: <a class="type" href="../libc/primitives/type.c_int.html" title="type libc::primitives::c_int">c_int</a>,
action: F,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.SigId.html" title="struct signal_hook_registry::SigId">SigId</a>, <a class="struct" href="https://doc.rust-lang.org/1.93.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(&amp;<a class="struct" href="../libc/unix/linux_like/linux/gnu/b64/x86_64/struct.siginfo_t.html" title="struct libc::unix::linux_like::linux::gnu::b64::x86_64::siginfo_t">siginfo_t</a>) + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Register a signal action.</p>
<p>This acts in the same way as <a href="fn.register.html" title="fn signal_hook_registry::register"><code>register</code></a>, including the drawbacks, panics and performance
characteristics. The only difference is the provided action accepts a <a href="../libc/unix/linux_like/linux/gnu/b64/x86_64/struct.siginfo_t.html" title="struct libc::unix::linux_like::linux::gnu::b64::x86_64::siginfo_t"><code>siginfo_t</code></a> argument,
providing information about the received signal.</p>
<h2 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h2>
<p>See the details of <a href="fn.register.html" title="fn signal_hook_registry::register"><code>register</code></a>.</p>
</div></details></section></div></main></body></html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Register a signal action without checking for forbidden signals."><title>register_signal_unchecked in signal_hook_registry - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="signal_hook_registry" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">register_signal_unchecked</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../signal_hook_registry/index.html">signal_<wbr>hook_<wbr>registry</a><span class="version">1.4.8</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">register_<wbr>signal_<wbr>unchecked</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#safety" title="Safety">Safety</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate signal_<wbr>hook_<wbr>registry</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">signal_hook_registry</a></div><h1>Function <span class="fn">register_<wbr>signal_<wbr>unchecked</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/signal_hook_registry/lib.rs.html#616-621">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe fn register_signal_unchecked&lt;F&gt;(
signal: <a class="type" href="../libc/primitives/type.c_int.html" title="type libc::primitives::c_int">c_int</a>,
action: F,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.SigId.html" title="struct signal_hook_registry::SigId">SigId</a>, <a class="struct" href="https://doc.rust-lang.org/1.93.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>() + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Register a signal action without checking for forbidden signals.</p>
<p>This acts in the same way as <a href="fn.register_unchecked.html" title="fn signal_hook_registry::register_unchecked"><code>register_unchecked</code></a>, including the drawbacks, panics and
performance characteristics. The only difference is the provided action doesnt accept a
<a href="../libc/unix/linux_like/linux/gnu/b64/x86_64/struct.siginfo_t.html" title="struct libc::unix::linux_like::linux::gnu::b64::x86_64::siginfo_t"><code>siginfo_t</code></a> argument.</p>
<h2 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h2>
<p>See the details of <a href="fn.register.html" title="fn signal_hook_registry::register"><code>register</code></a>.</p>
</div></details></section></div></main></body></html>

View File

@@ -0,0 +1,14 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Register a signal action without checking for forbidden signals."><title>register_unchecked in signal_hook_registry - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="signal_hook_registry" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">register_unchecked</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../signal_hook_registry/index.html">signal_<wbr>hook_<wbr>registry</a><span class="version">1.4.8</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">register_<wbr>unchecked</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#safety" title="Safety">Safety</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate signal_<wbr>hook_<wbr>registry</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">signal_hook_registry</a></div><h1>Function <span class="fn">register_<wbr>unchecked</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/signal_hook_registry/lib.rs.html#637-642">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe fn register_unchecked&lt;F&gt;(
signal: <a class="type" href="../libc/primitives/type.c_int.html" title="type libc::primitives::c_int">c_int</a>,
action: F,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.93.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.SigId.html" title="struct signal_hook_registry::SigId">SigId</a>, <a class="struct" href="https://doc.rust-lang.org/1.93.1/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt;<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(&amp;<a class="struct" href="../libc/unix/linux_like/linux/gnu/b64/x86_64/struct.siginfo_t.html" title="struct libc::unix::linux_like::linux::gnu::b64::x86_64::siginfo_t">siginfo_t</a>) + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/1.93.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,</div></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Register a signal action without checking for forbidden signals.</p>
<p>This acts the same way as <a href="fn.register_sigaction.html" title="fn signal_hook_registry::register_sigaction"><code>register_sigaction</code></a>, but without checking for the <a href="constant.FORBIDDEN.html" title="constant signal_hook_registry::FORBIDDEN"><code>FORBIDDEN</code></a>
signals. All the signals passed are registered and it is up to the caller to make some sense of
them.</p>
<p>Note that you really need to know what youre doing if you change eg. the <code>SIGSEGV</code> signal
handler. Generally, you dont want to do that. But unlike the other functions here, this
function still allows you to do it.</p>
<h2 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h2>
<p>See the details of <a href="fn.register.html" title="fn signal_hook_registry::register"><code>register</code></a>.</p>
</div></details></section></div></main></body></html>

View File

@@ -0,0 +1,14 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Removes a previously installed action."><title>unregister in signal_hook_registry - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="signal_hook_registry" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">unregister</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../signal_hook_registry/index.html">signal_<wbr>hook_<wbr>registry</a><span class="version">1.4.8</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">unregister</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#warning" title="Warning">Warning</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate signal_<wbr>hook_<wbr>registry</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">signal_hook_registry</a></div><h1>Function <span class="fn">unregister</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/signal_hook_registry/lib.rs.html#703-715">Source</a> </span></div><pre class="rust item-decl"><code>pub fn unregister(id: <a class="struct" href="struct.SigId.html" title="struct signal_hook_registry::SigId">SigId</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.93.1/std/primitive.bool.html">bool</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Removes a previously installed action.</p>
<p>This function does nothing if the action was already removed. It returns true if it was removed
and false if the action wasnt found.</p>
<p>It can unregister all the actions installed by <a href="fn.register.html" title="fn signal_hook_registry::register"><code>register</code></a> as well as the ones from downstream
crates (like <a href="https://docs.rs/signal-hook"><code>signal-hook</code></a>).</p>
<h2 id="warning"><a class="doc-anchor" href="#warning">§</a>Warning</h2>
<p>This does <em>not</em> currently return the default/previous signal handler if the last action for a
signal was just unregistered. That means that if you replaced for example <code>SIGTERM</code> and then
removed the action, the program will effectively ignore <code>SIGTERM</code> signals from now on, not
terminate on them as is the default action. This is OK if you remove it as part of a shutdown,
but it is not recommended to remove termination actions during the normal runtime of
application (unless the desired effect is to create something that can be terminated only by
SIGKILL).</p>
</div></details></section></div></main></body></html>

View File

@@ -0,0 +1,45 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Backend of the signal-hook crate."><title>signal_hook_registry - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="signal_hook_registry" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Crate signal_hook_registry</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../signal_hook_registry/index.html">signal_<wbr>hook_<wbr>registry</a><span class="version">1.4.8</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#what-this-crate-provides" title="What this crate provides">What this crate provides</a></li><li><a href="#what-this-is-for" title="What this is for">What this is for</a></li><li><a href="#rust-version-compatibility" title="Rust version compatibility">Rust version compatibility</a></li><li><a href="#portability" title="Portability">Portability</a></li></ul><h3><a href="#structs">Crate Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>signal_<wbr>hook_<wbr>registry</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/signal_hook_registry/lib.rs.html#1-870">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Backend of the <a href="https://docs.rs/signal-hook">signal-hook</a> crate.</p>
<p>The <a href="https://docs.rs/signal-hook">signal-hook</a> crate tries to provide an API to the unix signals, which are a global
resource. Therefore, it is desirable an application contains just one version of the crate
which manages this global resource. But that makes it impossible to make breaking changes in
the API.</p>
<p>Therefore, this crate provides very minimal and low level API to the signals that is unlikely
to have to change, while there may be multiple versions of the <a href="https://docs.rs/signal-hook">signal-hook</a> that all use this
low-level API to provide different versions of the high level APIs.</p>
<p>It is also possible some other crates might want to build a completely different API. This
split allows these crates to still reuse the same low-level routines in this crate instead of
going to the (much more dangerous) unix calls.</p>
<h2 id="what-this-crate-provides"><a class="doc-anchor" href="#what-this-crate-provides">§</a>What this crate provides</h2>
<p>The only thing this crate does is multiplexing the signals. An application or library can add
or remove callbacks and have multiple callbacks for the same signal.</p>
<p>It handles dispatching the callbacks and managing them in a way that uses only the
<a href="http://www.man7.org/linux/man-pages/man7/signal-safety.7.html">async-signal-safe</a> functions inside the signal handler. Note that the callbacks are still run
inside the signal handler, so it is up to the caller to ensure they are also
<a href="http://www.man7.org/linux/man-pages/man7/signal-safety.7.html">async-signal-safe</a>.</p>
<h2 id="what-this-is-for"><a class="doc-anchor" href="#what-this-is-for">§</a>What this is for</h2>
<p>This is a building block for other libraries creating reasonable abstractions on top of
signals. The <a href="https://docs.rs/signal-hook">signal-hook</a> is the generally preferred way if you need to handle signals in your
application and provides several safe patterns of doing so.</p>
<h2 id="rust-version-compatibility"><a class="doc-anchor" href="#rust-version-compatibility">§</a>Rust version compatibility</h2>
<p>Currently builds on 1.26.0 an newer and this is very unlikely to change. However, tests
require dependencies that dont build there, so tests need newer Rust version (they are run on
stable).</p>
<p>Note that this ancient version of rustc no longer compiles current versions of <code>libc</code>. If you
want to use rustc this old, you need to force your dependency resolution to pick old enough
version of <code>libc</code> (<code>0.2.156</code> was found to work, but newer ones may too).</p>
<h2 id="portability"><a class="doc-anchor" href="#portability">§</a>Portability</h2>
<p>This crate includes a limited support for Windows, based on <code>signal</code>/<code>raise</code> in the CRT.
There are differences in both API and behavior:</p>
<ul>
<li>Due to lack of <code>siginfo_t</code>, we dont provide <code>register_sigaction</code> or <code>register_unchecked</code>.</li>
<li>Due to lack of signal blocking, theres a race condition.
After the call to <code>signal</code>, theres a moment where we miss a signal.
That means when you register a handler, there may be a signal which invokes
neither the default handler or the handler you register.</li>
<li>Handlers registered by <code>signal</code> in Windows are cleared on first signal.
To match behavior in other platforms, we re-register the handler each time the handler is
called, but theres a moment where we miss a handler.
That means when you receive two signals in a row, there may be a signal which invokes
the default handler, nevertheless you certainly have registered the handler.</li>
</ul>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.SigId.html" title="struct signal_hook_registry::SigId">SigId</a></dt><dd>An ID of registered action.</dd></dl><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><dl class="item-table"><dt><a class="constant" href="constant.FORBIDDEN.html" title="constant signal_hook_registry::FORBIDDEN">FORBIDDEN</a></dt><dd>List of forbidden signals.</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.register.html" title="fn signal_hook_registry::register">register</a><sup title="unsafe function"></sup></dt><dd>Registers an arbitrary action for the given signal.</dd><dt><a class="fn" href="fn.register_sigaction.html" title="fn signal_hook_registry::register_sigaction">register_<wbr>sigaction</a><sup title="unsafe function"></sup></dt><dd>Register a signal action.</dd><dt><a class="fn" href="fn.register_signal_unchecked.html" title="fn signal_hook_registry::register_signal_unchecked">register_<wbr>signal_<wbr>unchecked</a><sup title="unsafe function"></sup></dt><dd>Register a signal action without checking for forbidden signals.</dd><dt><a class="fn" href="fn.register_unchecked.html" title="fn signal_hook_registry::register_unchecked">register_<wbr>unchecked</a><sup title="unsafe function"></sup></dt><dd>Register a signal action without checking for forbidden signals.</dd><dt><a class="fn" href="fn.unregister.html" title="fn signal_hook_registry::unregister">unregister</a></dt><dd>Removes a previously installed action.</dd></dl></section></div></main></body></html>

View File

@@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"constant":["FORBIDDEN"],"fn":["register","register_sigaction","register_signal_unchecked","register_unchecked","unregister"],"struct":["SigId"]};

File diff suppressed because one or more lines are too long