From nobody Wed Apr 27 23:27:50 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9F36E1AA906F; Wed, 27 Apr 2022 23:27:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KpZft6pg0z4YMv; Wed, 27 Apr 2022 23:27:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651102071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PM31JbP8wc6pFZ8gtaleEGpD0ytJ9lYFBrfDacC3y44=; b=hQ2IdqWiSxnBvk+3PFY+TiC9yyT3nSS8OktjzjOe5txKTpG5JKxR+QMi14eceqcGtqJTKV yaYTzGbZ+16dvzE3iQWV2G87KzuRU+jFbOQ6OgxBKz6vJXpHUSrunZ6C6Ev84icX4zfTL+ aoL5pjqhWP6wIil1lTEpHcenh9xadRN0d9BpL6fA7l7edSsj8LM3QlxgbPw6OkuSNM1hRP xIF9y8+TVHxh5MuFJoDL2ukoBTY2YTEfhgLlRNhEVRM8w6k2ETZoeGzJtM1RZwYK9ZX8T0 WuoaLwSIdLROIFQt6XGXN7hutahZHmnjHaV96C7js/aK4AQc/Bdl1X8AeT6PoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A46E5721; Wed, 27 Apr 2022 23:27:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23RNRoq0071863; Wed, 27 Apr 2022 23:27:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23RNRoKo071862; Wed, 27 Apr 2022 23:27:50 GMT (envelope-from git) Date: Wed, 27 Apr 2022 23:27:50 GMT Message-Id: <202204272327.23RNRoKo071862@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 134529b11b53 - main - reap_kill(): rename the reap variable to reaper List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 134529b11b5343aed09e220b49147873d052e4bf Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651102071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PM31JbP8wc6pFZ8gtaleEGpD0ytJ9lYFBrfDacC3y44=; b=cDzyJdM2oVLpmDmSl7xi/tHEi/4csMqqU7GN2Sy7DC+ePm4zLMaS6HidpuVS6fHWAu9K0e S4ABjLiK3Knm/QsCXl4VxNXaPE4y+tRywz3k0Cw+Bk3XbN3Ot5nYvLjrvNJxcf/cs1tlc7 kUyYI9jTBAvz1qDre1HZ/llRoqUlf2Lsw2DpDHfo570xZvsa2y2eue3M5MGOIjfvHUmg7f gUwSryxhWqPLxWxy7066oKrPTLVl5SV7GhXGRb4ikLYhbRvoyrxw+7nSmexuYE0Jj6Bq/R pjbW93yzm443XRt4Zfi8rxeOaHfLnDbPq61i3s569/hn/VMzkRfgGmBt0rsuvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651102071; a=rsa-sha256; cv=none; b=ubbU+AIqm6MPfwFw4oI+p3AG53EYsQfMOkfz9aQdX/r4ulHiKVqaYYm08j5J2efa50J4AI XDeJNeP8AwYlXK5trq2ilVOK0CdRRdCfFlXr0P7is+fKBm8Cx606aHCL7FU545+din64n0 2WTb6jrf08bZxqU/TpfJy+/IxwTRGnXCplUblMSOg3SH4851y6KMM+6l6+REWtEv4wUrTL KyhA4jSe98MbtkXA0IkSQs4bcuzjt+o3bq9CZMoTWmnBSlQYqWFXPO2unJShk4A8w94CzG 6LQAaR1tvBDtPA/2dPSc+lLLCdiqgbkSciyBNS8La5XFZ05uKFFIv6ZDHJf58A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=134529b11b5343aed09e220b49147873d052e4bf commit 134529b11b5343aed09e220b49147873d052e4bf Author: Konstantin Belousov AuthorDate: 2022-04-25 22:10:16 +0000 Commit: Konstantin Belousov 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;