From 747760e190a0a310514f3dd47e4e1e9174658c13 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Tue, 8 Oct 2024 12:02:25 +0000 Subject: Replace ps_oppid (old parent pid) with ps_opptr (a pointer to the old parent process struct). This simplifies some code and removes the no need to call prfind in process_untrace(). OK mpi@ --- sys/kern/sys_process.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/kern/sys_process.c') diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 36c402135ae..6ab263c7eca 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_process.c,v 1.101 2024/10/08 09:05:40 claudio Exp $ */ +/* $OpenBSD: sys_process.c,v 1.102 2024/10/08 12:02:24 claudio Exp $ */ /* $NetBSD: sys_process.c,v 1.55 1996/05/15 06:17:47 tls Exp $ */ /*- @@ -294,7 +294,7 @@ ptrace_ctrl(struct proc *p, int req, pid_t pid, caddr_t addr, int data) return EBUSY; } atomic_setbits_int(&tr->ps_flags, PS_TRACED); - tr->ps_oppid = tr->ps_ppid; + tr->ps_opptr = tr->ps_pptr; mtx_leave(&tr->ps_mtx); if (tr->ps_ptstat == NULL) tr->ps_ptstat = malloc(sizeof(*tr->ps_ptstat), @@ -534,7 +534,7 @@ ptrace_ctrl(struct proc *p, int req, pid_t pid, caddr_t addr, int data) */ mtx_enter(&tr->ps_mtx); atomic_setbits_int(&tr->ps_flags, PS_TRACED); - tr->ps_oppid = tr->ps_ppid; + tr->ps_opptr = tr->ps_pptr; process_reparent(tr, p->p_p); mtx_leave(&tr->ps_mtx); if (tr->ps_ptstat == NULL) -- cgit v1.2.3