Date: Wed, 16 Sep 2020 21:38:25 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365812 - head/sys/kern Message-ID: <202009162138.08GLcPUU033715@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Wed Sep 16 21:38:24 2020 New Revision: 365812 URL: https://svnweb.freebsd.org/changeset/base/365812 Log: proc_realparent: if p_oppid does not match pid of the current parent for non-orphaned process, return reaper instead of init. Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D26416 Modified: head/sys/kern/kern_exit.c Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Wed Sep 16 21:34:18 2020 (r365811) +++ head/sys/kern/kern_exit.c Wed Sep 16 21:38:24 2020 (r365812) @@ -104,7 +104,7 @@ proc_realparent(struct proc *child) sx_assert(&proctree_lock, SX_LOCKED); if ((child->p_treeflag & P_TREE_ORPHANED) == 0) return (child->p_pptr->p_pid == child->p_oppid ? - child->p_pptr : initproc); + child->p_pptr : child->p_reaper); for (p = child; (p->p_treeflag & P_TREE_FIRST_ORPHAN) == 0;) { /* Cannot use LIST_PREV(), since the list head is not known. */ p = __containerof(p->p_orphan.le_prev, struct proc,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009162138.08GLcPUU033715>