diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-10-08 12:02:25 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-10-08 12:02:25 +0000 |
commit | 747760e190a0a310514f3dd47e4e1e9174658c13 (patch) | |
tree | 7a7eb2db167d845b99f9da4e0ea94ece27e03238 /sys/kern/sys_process.c | |
parent | 95fc67dc16e9e434bea9ac58b6b562fc8b9b637a (diff) |
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@
Diffstat (limited to 'sys/kern/sys_process.c')
-rw-r--r-- | sys/kern/sys_process.c | 6 |
1 files changed, 3 insertions, 3 deletions
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) |