Restore previous semantics of PT_LWPINFO and make sure to lwp_addref the
LWP. OK'ed by ad.
This commit is contained in:
parent
298d20388c
commit
335ac44f76
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sys_process.c,v 1.123 2007/03/09 14:11:26 ad Exp $ */
|
||||
/* $NetBSD: sys_process.c,v 1.124 2007/03/15 20:55:15 skrll Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
|
@ -93,7 +93,7 @@
|
|||
#include "opt_ktrace.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sys_process.c,v 1.123 2007/03/09 14:11:26 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sys_process.c,v 1.124 2007/03/15 20:55:15 skrll Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -630,10 +630,12 @@ sys_ptrace(struct lwp *l, void *v, register_t *retval)
|
|||
error = ESRCH;
|
||||
break;
|
||||
}
|
||||
lt = LIST_NEXT(lt, l_sibling);
|
||||
}
|
||||
pl.pl_lwpid = 0;
|
||||
pl.pl_event = 0;
|
||||
if (lt) {
|
||||
lwp_addref(lt);
|
||||
pl.pl_lwpid = lt->l_lid;
|
||||
if (lt->l_lid == t->p_sigctx.ps_lwp)
|
||||
pl.pl_event = PL_EVENT_SIGNAL;
|
||||
|
|
Loading…
Reference in New Issue