diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2002-04-18 08:25:05 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2002-04-18 08:25:05 +0000 |
commit | 20ee1322a1e4d34926d2e2bcb288ecfac8a06b22 (patch) | |
tree | 048874e17c4f9b007ecc962ddc4970acdce512e3 /sys/kern | |
parent | e3b66af4a7517f7687ef514cf6b44c81f1e2a578 (diff) |
Provide the correct signal number to the ktrace PSIG information instead
of an uninitialized variable.
millert@ ok
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_sig.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index c1511bab3e7..aa456f3cbc4 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sig.c,v 1.56 2002/03/14 01:27:04 millert Exp $ */ +/* $OpenBSD: kern_sig.c,v 1.57 2002/04/18 08:25:04 miod Exp $ */ /* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */ /* @@ -1154,6 +1154,13 @@ postsig(signum) mask = sigmask(signum); p->p_siglist &= ~mask; action = ps->ps_sigact[signum]; + + if (ps->ps_sig != signum) { + code = 0; + } else { + code = ps->ps_code; + } + #ifdef KTRACE if (KTRPOINT(p, KTR_PSIG)) { siginfo_t si; @@ -1203,10 +1210,7 @@ postsig(signum) } splx(s); p->p_stats->p_ru.ru_nsignals++; - if (ps->ps_sig != signum) { - code = 0; - } else { - code = ps->ps_code; + if (ps->ps_sig == signum) { ps->ps_code = 0; } null_sigval.sival_ptr = 0; |