minix/lib/libc/sys-minix/sigaction.c
Lionel Sambuc b90d99dab3 Message type for PM_{KILL,SIGACTION}
Change-Id: I7fac9a894e319671e12bfa7430984ca1cf24da33
2014-07-28 17:05:42 +02:00

25 lines
545 B
C

#include <sys/cdefs.h>
#include <lib.h>
#include "namespace.h"
#include <string.h>
#include <signal.h>
int __sigreturn(void);
int sigaction(int sig, const struct sigaction *act, struct sigaction *oact)
{
message m;
memset(&m, 0, sizeof(m));
m.m_lc_pm_sig.nr = sig;
m.m_lc_pm_sig.act = (vir_bytes)act;
m.m_lc_pm_sig.oact = (vir_bytes)oact;
m.m_lc_pm_sig.ret = (vir_bytes)__sigreturn;
return(_syscall(PM_PROC_NR, PM_SIGACTION, &m));
}
#if defined(__minix) && defined(__weak_alias)
__weak_alias(sigaction, __sigaction14)
#endif