Struct signal_hook::iterator::exfiltrator::origin::WithOrigin [−][src]
pub struct WithOrigin(_);
This is supported on non-Windows and crate feature
iterator
and crate feature extended-siginfo
only.Expand description
The Exfiltrator
that produces Origin
of
signals.
Examples
// Subscribe to SIGUSR1, with information about the process.
let mut signals = SignalsInfo::<WithOrigin>::new(&[SIGUSR1])?;
// Send a signal to ourselves.
let my_pid = unsafe { libc::getpid() };
unsafe { libc::kill(my_pid, SIGUSR1) };
// Grab the signal and look into the details.
let received = signals.wait().next().unwrap();
assert_eq!(SIGUSR1, received.signal);
assert_eq!(my_pid, received.process.unwrap().pid);
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for WithOrigin
impl Send for WithOrigin
impl Sync for WithOrigin
impl Unpin for WithOrigin
impl UnwindSafe for WithOrigin
Blanket Implementations
Mutably borrows from an owned value. Read more