From 1f60859d7044e0a3cb65a2e366b37a0bcb10cd90 Mon Sep 17 00:00:00 2001 From: kettenis Date: Fri, 13 Apr 2012 19:20:31 +0000 Subject: 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. --- sys/kern/sys_process.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/kern/sys_process.c') 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. */ -- cgit v1.2.3-59-g8ed1b