endpoint_sec/event/event_exit.rs
1//! [`EventExit`]
2
3use endpoint_sec_sys::es_event_exit_t;
4
5/// Terminate a process event.
6#[doc(alias = "es_event_exit_t")]
7pub struct EventExit<'a> {
8 /// Raw event
9 pub(crate) raw: &'a es_event_exit_t,
10}
11
12impl EventExit<'_> {
13 /// The exit status of a process.
14 #[inline(always)]
15 pub fn stat(&self) -> i32 {
16 self.raw.stat
17 }
18}
19
20// Safety: safe to send across threads: does not contain any interior mutability nor depend on current thread state
21unsafe impl Send for EventExit<'_> {}
22// Safety: safe to share across threads: does not contain any interior mutability nor depend on current thread state
23unsafe impl Sync for EventExit<'_> {}
24
25impl_debug_eq_hash_with_functions!(EventExit<'a>; stat);