git: 55b04fbcf8cd - stable/13 - reap_kill(): rename the reap variable to reaper
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 24 Jun 2022 19:36:48 UTC
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=55b04fbcf8cd0688254c33b70af75ef9e8e98259 commit 55b04fbcf8cd0688254c33b70af75ef9e8e98259 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2022-04-25 22:10:16 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2022-06-24 14:45:44 +0000 reap_kill(): rename the reap variable to reaper (cherry picked from commit 134529b11b5343aed09e220b49147873d052e4bf) --- sys/kern/kern_procctl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_procctl.c b/sys/kern/kern_procctl.c index 96748e27f57c..a8c56f7ae8ff 100644 --- a/sys/kern/kern_procctl.c +++ b/sys/kern/kern_procctl.c @@ -281,7 +281,7 @@ reap_kill_sched(struct reap_kill_tracker_head *tracker, struct proc *p2) static int reap_kill(struct thread *td, struct proc *p, void *data) { - struct proc *reap, *p2; + struct proc *reaper, *p2; ksiginfo_t ksi; struct reap_kill_tracker_head tracker; struct reap_kill_tracker *t; @@ -299,7 +299,7 @@ reap_kill(struct thread *td, struct proc *p, void *data) (REAPER_KILL_CHILDREN | REAPER_KILL_SUBTREE)) return (EINVAL); PROC_UNLOCK(p); - reap = (p->p_treeflag & P_TREE_REAPER) == 0 ? p->p_reaper : p; + reaper = (p->p_treeflag & P_TREE_REAPER) == 0 ? p->p_reaper : p; ksiginfo_init(&ksi); ksi.ksi_signo = rk->rk_sig; ksi.ksi_code = SI_USER; @@ -309,7 +309,7 @@ reap_kill(struct thread *td, struct proc *p, void *data) rk->rk_killed = 0; rk->rk_fpid = -1; if ((rk->rk_flags & REAPER_KILL_CHILDREN) != 0) { - LIST_FOREACH(p2, &reap->p_children, p_sibling) { + LIST_FOREACH(p2, &reaper->p_children, p_sibling) { reap_kill_proc(td, p2, &ksi, rk, &error); /* * Do not end the loop on error, signal @@ -318,13 +318,13 @@ reap_kill(struct thread *td, struct proc *p, void *data) } } else { TAILQ_INIT(&tracker); - reap_kill_sched(&tracker, reap); + reap_kill_sched(&tracker, reaper); while ((t = TAILQ_FIRST(&tracker)) != NULL) { MPASS((t->parent->p_treeflag & P_TREE_REAPER) != 0); TAILQ_REMOVE(&tracker, t, link); LIST_FOREACH(p2, &t->parent->p_reaplist, p_reapsibling) { - if (t->parent == reap && + if (t->parent == reaper && (rk->rk_flags & REAPER_KILL_SUBTREE) != 0 && p2->p_reapsubtree != rk->rk_subtree) continue;