summaryrefslogtreecommitdiffstats
path: root/sys/kern/sys_process.c
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2012-04-13 19:20:31 +0000
committerkettenis <kettenis@openbsd.org>2012-04-13 19:20:31 +0000
commit1f60859d7044e0a3cb65a2e366b37a0bcb10cd90 (patch)
tree44953197f3448d9d13ecf140677f769ecc9d26c5 /sys/kern/sys_process.c
parentDon't convert a mbuf to a cluster and think the data in the mbuf is still (diff)
downloadwireguard-openbsd-1f60859d7044e0a3cb65a2e366b37a0bcb10cd90.tar.xz
wireguard-openbsd-1f60859d7044e0a3cb65a2e366b37a0bcb10cd90.zip
For now, direct the kill signal sent by PT_KILL to the thread that made us
stop, just like we do for PT_CONTINUE/PT_STEP. The current code isn't ready for directing signals to other threads yet.
Diffstat (limited to 'sys/kern/sys_process.c')
-rw-r--r--sys/kern/sys_process.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c
index 14a19211c0a..b36da4fb13d 100644
--- a/sys/kern/sys_process.c
+++ b/sys/kern/sys_process.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sys_process.c,v 1.56 2012/04/13 16:37:51 kettenis Exp $ */
+/* $OpenBSD: sys_process.c,v 1.57 2012/04/13 19:20:31 kettenis Exp $ */
/* $NetBSD: sys_process.c,v 1.55 1996/05/15 06:17:47 tls Exp $ */
/*-
@@ -519,6 +519,9 @@ sys_ptrace(struct proc *p, void *v, register_t *retval)
return (error);
case PT_KILL:
+ if (SCARG(uap, pid) < THREAD_PID_OFFSET && tr->ps_single)
+ t = tr->ps_single;
+
/* just send the process a KILL signal. */
SCARG(uap, data) = SIGKILL;
goto sendsig; /* in PT_CONTINUE, above. */