HomeFreeBSD

Fix fixjobc+orhpanage.

Description

Fix fixjobc+orhpanage.

Orphans affect job control state, we must account for them when
changing pg_jobc.

Instead of p_pptr, use proc_realparent() to get parent relevant for
job control.

Use correct calculation of the parent for exiting process. For jobc
purposes, we must use realparent, but if it is also exiting, we should
fall to reaper, then recursively find non-exiting reaper.

Reported by: trasz
PR: 249257
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D26416

Details

Provenance
kibAuthored on
Differential Revision
D26416: Fix fixjobc+orhpanage.
Parents
rS365813: Assert that P_TREE_GRPEXITED is set only once.
Branches
Unknown
Tags
Unknown