minix/lib/libc/sys-minix/sigaction.c

26 lines
545 B
C
Raw Normal View History

#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));
}
2013-01-07 20:10:08 +01:00
2013-01-18 00:06:11 +01:00
#if defined(__minix) && defined(__weak_alias)
2013-01-07 20:10:08 +01:00
__weak_alias(sigaction, __sigaction14)
#endif