summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_sig.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 02707e90685..1c9f7b23c2c 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sig.c,v 1.13 1996/10/27 08:01:26 tholo Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.14 1997/01/27 01:15:32 deraadt Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
@@ -120,6 +120,8 @@ sys_sigaction(p, v, retval)
sa->sa_flags |= SA_RESTART;
if ((ps->ps_sigreset & bit) != 0)
sa->sa_flags |= SA_RESETHAND;
+ if ((ps->ps_siginfo & bit) != 0)
+ sa->sa_flags |= SA_SIGINFO;
if (signum == SIGCHLD) {
if ((p->p_flag & P_NOCLDSTOP) != 0)
sa->sa_flags |= SA_NOCLDSTOP;
@@ -170,6 +172,10 @@ setsigvec(p, signum, sa)
ps->ps_sigreset |= bit;
else
ps->ps_sigreset &= ~bit;
+ if ((sa->sa_flags & SA_SIGINFO) != 0)
+ ps->ps_siginfo |= bit;
+ else
+ ps->ps_siginfo &= ~bit;
if ((sa->sa_flags & SA_RESTART) == 0)
ps->ps_sigintr |= bit;
else
@@ -1171,3 +1177,13 @@ sys_nosys(p, v, retval)
psignal(p, SIGSYS);
return (ENOSYS);
}
+
+void
+initsiginfo(si, sig)
+ siginfo_t *si;
+ int sig;
+{
+ bzero(si, sizeof *si);
+ si->si_signo = sig;
+ si->si_addr = (caddr_t)-1;
+}