summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2012-04-13 19:20:32 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2012-04-13 19:20:32 +0000
commit805f797d4dcfacfb369c3161c7515988eb66dd0f (patch)
tree8304fdfa6a9a65aa65141755aec49c4db670e1fd /sys/kern
parentaabd0cb9681e203f8636bcb5d2ecf74dbb8a482c (diff)
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')
-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. */