[−][src]Struct signal_hook::low_level::siginfo::Origin
Information about a signal and its origin.
This is produced by the [WithOrigin
] exfiltrator (or can be extracted from
siginfo_t
by hand).
Fields (Non-exhaustive)
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.signal: c_int
The signal that happened.
process: Option<Process>
Information about the process that caused the signal.
Note that not all signals are caused by a specific process or have the information
available („fault“ signals like SIGBUS
don't have, any signal may be sent by the kernel
instead of a specific process).
This is filled in whenever available. For most signals, this is the process that sent the
signal (by kill
or similar), for SIGCHLD
it is the child that caused the signal.
cause: Cause
How the signal happened.
This is a best-effort value. In particular, some systems may have causes not known to this
library. Some other systems (MacOS) does not fill the value in so there's no way to know.
In all these cases, this will contain Cause::Unknown
.
Some values are platform specific and not available on other systems.
Future versions may enrich the enum by further values.
Implementations
impl Origin
[src]
pub unsafe fn extract(info: &siginfo_t) -> Self
[src]
Extracts the Origin from a raw siginfo_t
structure.
This function is async-signal-safe, can be called inside a signal handler.
Safety
On systems where the structure is backed by an union on the C side, this requires the
si_code
and si_signo
fields must be set properly according to what fields are
available.
The value passed by kernel satisfies this, care must be taken only when constructed manually.
Trait Implementations
impl Clone for Origin
[src]
impl Debug for Origin
[src]
impl Eq for Origin
[src]
impl PartialEq<Origin> for Origin
[src]
impl StructuralEq for Origin
[src]
impl StructuralPartialEq for Origin
[src]
Auto Trait Implementations
impl RefUnwindSafe for Origin
[src]
impl Send for Origin
[src]
impl Sync for Origin
[src]
impl Unpin for Origin
[src]
impl UnwindSafe for Origin
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,