1
0
Fork 0
forked from wry/wry

all: split reusable components into workspace crates

This commit is contained in:
kossLAN 2026-05-29 09:14:53 -04:00
parent 2a079ed800
commit 657e7ce2f7
No known key found for this signature in database
225 changed files with 7422 additions and 17602 deletions

View file

@ -0,0 +1,23 @@
use {
crate::oserror::{OsError, OsErrorExt},
c::{c_int, syscall},
std::{ptr, rc::Rc},
uapi::{
OwnedFd,
c::{self, SYS_pidfd_send_signal, siginfo_t},
map_err,
},
};
pub fn pidfd_send_signal(pidfd: &Rc<OwnedFd>, signal: c_int) -> Result<(), OsError> {
let res = unsafe {
syscall(
SYS_pidfd_send_signal,
pidfd.raw(),
signal,
ptr::null_mut::<siginfo_t>(),
0,
)
};
map_err!(res).map(drop).to_os_error()
}