git: 134529b11b53 - main - reap_kill(): rename the reap variable to reaper
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Apr 2022 23:27:50 UTC
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=134529b11b5343aed09e220b49147873d052e4bf commit 134529b11b5343aed09e220b49147873d052e4bf Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2022-04-25 22:10:16 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2022-04-27 23:27:34 +0000 reap_kill(): rename the reap variable to reaper Suggested and reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D35014 --- 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;