HomeFreeBSD

Set the p_oppid field of orphans when exiting.

Description

Set the p_oppid field of orphans when exiting.

Such processes will be reparented to the reaper when the current
parent is done with them (i.e., ptrace detached), so p_oppid must be
updated accordingly.

Add a regression test to exercise this code path. Previously it
would not be possible to reap an orphan with a stale oppid.

Reviewed by: kib, mjg
Tested by: pho
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19825

Details

Provenance
markjAuthored on
Reviewer
kib
Differential Revision
D19825: Set the oppid field of orphans when exiting.
Parents
rS346008: loader: command_lsefi: ret can be used uninitialized
Branches
Unknown
Tags
Unknown