summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2008-12-13 18:55:01 +0000
committerad <ad@NetBSD.org>2008-12-13 18:55:01 +0000
commit2e606b7b1bb01c85cd8a79d0720440f7511a32e2 (patch)
treea41d2d85145c8b27071c03a2e7e2090fcc8f148e /sys
parentee1b2317fbd594c33425f65d97cda1aedb380818 (diff)
sigchecktrace: process SIGKILL before everything else.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_sig.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 62f221cc4cd..d43bee72d6f 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_sig.c,v 1.291 2008/11/25 15:05:38 ad Exp $ */
+/* $NetBSD: kern_sig.c,v 1.292 2008/12/13 18:55:01 ad Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.291 2008/11/25 15:05:38 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.292 2008/12/13 18:55:01 ad Exp $");
#include "opt_ptrace.h"
#include "opt_compat_sunos.h"
@@ -1685,6 +1685,10 @@ sigchecktrace(sigpend_t **spp)
KASSERT(mutex_owned(p->p_lock));
+ /* If there's a pending SIGKILL, process it immediately. */
+ if (sigismember(&p->p_sigpend.sp_set, SIGKILL))
+ return 0;
+
/*
* If we are no longer being traced, or the parent didn't
* give us a signal, look for more signals.
@@ -1692,10 +1696,6 @@ sigchecktrace(sigpend_t **spp)
if ((p->p_slflag & PSL_TRACED) == 0 || p->p_xstat == 0)
return 0;
- /* If there's a pending SIGKILL, process it immediately. */
- if (sigismember(&p->p_sigpend.sp_set, SIGKILL))
- return 0;
-
/*
* If the new signal is being masked, look for other signals.
* `p->p_sigctx.ps_siglist |= mask' is done in setrunnable().