summaryrefslogblamecommitdiff
path: root/src/signal/sigqueue.c
blob: b8135d56234e16a9cd75b49863f0c929385d96d5 (plain) (tree)
1
2
3
4
5
6
7






                                                          






                                  

                                                                   
#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 syscall3(__NR_rt_sigqueueinfo, pid, sig, (long)&si);
}