WIP: implement sigqueue

This commit is contained in:
4lDO2
2024-07-25 19:28:10 +02:00
parent 1e97bae11b
commit 75b2dcaa45
6 changed files with 33 additions and 6 deletions
+11
View File
@@ -67,6 +67,11 @@ pub struct siginfo {
#[no_mangle]
pub extern "C" fn _cbindgen_export_siginfo(a: siginfo) {}
pub union sigval {
pub si_int: c_int,
pub si_ptr: *mut c_void,
}
/// cbindgen:ignore
pub type sigset_t = c_ulonglong;
/// cbindgen:ignore
@@ -78,6 +83,12 @@ pub type stack_t = sigaltstack;
pub extern "C" fn kill(pid: pid_t, sig: c_int) -> c_int {
Sys::kill(pid, sig)
}
#[no_mangle]
pub extern "C" fn sigqueue(pid: pid_t, sig: c_int, val: sigval) -> c_int {
Sys::sigqueue(pid, sig, val)
.map(|()| 0)
.or_minus_one_errno()
}
#[no_mangle]
pub extern "C" fn killpg(pgrp: pid_t, sig: c_int) -> c_int {