diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-08-06 12:10:29 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-08-06 12:10:29 +0000 |
commit | d1b0415a5f6e0687db6b4e0f32ffd6d3f1d0fb2e (patch) | |
tree | ef07ce1fc1682c7a82a608b8f858b132e3d0eb25 /sys/arch/m68k | |
parent | b03d0711c9c1ef5378f8520681fc1c2d3ab5aa54 (diff) |
If a process has trashed its stack, use sigexit() instead of psignal() to
terminate it with prejudice, as done in native sendsig().
Plus you get a memory leak in COMPAT_HPUX on m68k fixed for free.
review art@ test martin@
Diffstat (limited to 'sys/arch/m68k')
-rw-r--r-- | sys/arch/m68k/m68k/sunos_machdep.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/sys/arch/m68k/m68k/sunos_machdep.c b/sys/arch/m68k/m68k/sunos_machdep.c index 18a8874fed9..6aec0cd9477 100644 --- a/sys/arch/m68k/m68k/sunos_machdep.c +++ b/sys/arch/m68k/m68k/sunos_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sunos_machdep.c,v 1.16 2003/08/01 18:37:28 miod Exp $ */ +/* $OpenBSD: sunos_machdep.c,v 1.17 2005/08/06 12:10:28 miod Exp $ */ /* $NetBSD: sunos_machdep.c,v 1.12 1996/10/13 03:19:22 christos Exp $ */ /* @@ -116,12 +116,8 @@ sunos_sendsig(catcher, sig, mask, code, type, val) * have the process die unconditionally. */ if (ft >= FMT9) { - SIGACTION(p, sig) = SIG_DFL; - p->p_sigignore &= ~sig; - p->p_sigcatch &= ~sig; - p->p_sigmask &= ~sig; - psignal(p, sig); - return; + sigexit(p, sig); + /* NOTREACHED */ } /* @@ -173,13 +169,8 @@ sunos_sendsig(catcher, sig, mask, code, type, val) * Process has trashed its stack; give it an illegal * instruction to halt it in its tracks. */ - SIGACTION(p, SIGILL) = SIG_DFL; - sig = sigmask(SIGILL); - p->p_sigignore &= ~sig; - p->p_sigcatch &= ~sig; - p->p_sigmask &= ~sig; - psignal(p, SIGILL); - return; + sigexit(p, SIGILL); + /* NOTREACHED */ } frame->f_regs[SP] = (int)fp; |