Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Fix generation of PTRACE_LWP_EXIT event



details:   https://anonhg.NetBSD.org/src/rev/14c367b6942b
branches:  trunk
changeset: 820759:14c367b6942b
user:      kamil <kamil%NetBSD.org@localhost>
date:      Sat Jan 14 19:32:10 2017 +0000

description:
Fix generation of PTRACE_LWP_EXIT event

Set p_lwp_exited instead of p_lwp_created for PTRACE_LWP_EXIT.

This made the lwp_exit1 ATF test passing.

Sponsored by <The NetBSD Foundation>

diffstat:

 sys/kern/kern_lwp.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r b37b6cf32e20 -r 14c367b6942b sys/kern/kern_lwp.c
--- a/sys/kern/kern_lwp.c       Sat Jan 14 19:17:10 2017 +0000
+++ b/sys/kern/kern_lwp.c       Sat Jan 14 19:32:10 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_lwp.c,v 1.186 2017/01/14 06:36:52 kamil Exp $     */
+/*     $NetBSD: kern_lwp.c,v 1.187 2017/01/14 19:32:10 kamil Exp $     */
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -211,7 +211,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.186 2017/01/14 06:36:52 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.187 2017/01/14 19:32:10 kamil Exp $");
 
 #include "opt_ddb.h"
 #include "opt_lockdebug.h"
@@ -1056,7 +1056,7 @@
                /* Tracing */
                KASSERT((l->l_flag & LW_SYSTEM) == 0);
 
-               p->p_lwp_created = l->l_lid;
+               p->p_lwp_exited = l->l_lid;
 
                KSI_INIT_EMPTY(&ksi);
                ksi.ksi_signo = SIGTRAP;



Home | Main Index | Thread Index | Old Index