diff options
Diffstat (limited to '')
-rw-r--r-- | libc-top-half/musl/src/signal/sigqueue.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/signal/sigqueue.c b/libc-top-half/musl/src/signal/sigqueue.c new file mode 100644 index 0000000..b75f0c5 --- /dev/null +++ b/libc-top-half/musl/src/signal/sigqueue.c @@ -0,0 +1,22 @@ +#include <signal.h> +#include <string.h> +#include <unistd.h> +#include "syscall.h" +#include "pthread_impl.h" + +int sigqueue(pid_t pid, int sig, const union sigval value) +{ + siginfo_t si; + sigset_t set; + int r; + memset(&si, 0, sizeof si); + si.si_signo = sig; + si.si_code = SI_QUEUE; + si.si_value = value; + si.si_uid = getuid(); + __block_app_sigs(&set); + si.si_pid = getpid(); + r = syscall(SYS_rt_sigqueueinfo, pid, sig, &si); + __restore_sigs(&set); + return r; +} |