summaryrefslogtreecommitdiff
path: root/src/signal/sigqueue.c
blob: aeac4875b3bd3d9aeecd0b3f28ffb752146924ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <signal.h>
#include <string.h>
#include <unistd.h>
#include "syscall.h"

int sigqueue(pid_t pid, int sig, const union sigval value)
{
	siginfo_t si;
	memset(&si, 0, sizeof si);
	si.si_signo = sig;
	si.si_code = SI_QUEUE;
	si.si_value = value;
	si.si_pid = getpid();
	si.si_uid = getuid();
	return syscall(SYS_rt_sigqueueinfo, pid, sig, &si);
}