WIP: implement sigqueue
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user