Enum signal_hook::low_level::siginfo::Cause
source · #[non_exhaustive]pub enum Cause {
Unknown,
Kernel,
Sent(Sent),
Chld(Chld),
}
extended-siginfo-raw
only.Expand description
What caused a signal.
This is a best-effort (and possibly incomplete) representation of the C siginfo_t::si_code
.
It may differ between OSes and may be extended in future versions.
Note that this doesn’t contain all the „fault“ signals (SIGILL
, SIGSEGV
and similar).
There’s no reasonable way to use the exfiltrators with them, since the handler either needs to
terminate the process or somehow recover from the situation. Things based on exfiltrators do
neither, which would cause an UB and therefore these values just don’t make sense.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unknown
The cause is unknown.
Some systems don’t fill this in. Some systems have values we don’t understand. Some signals don’t have specific reasons to come to being.
Kernel
Sent by the kernel.
This probably exists only on Linux.
Sent(Sent)
The signal was sent by other process.
Chld(Chld)
A SIGCHLD
, caused by a child process changing state.