Files
freebsd/lib/libkvm
GenericRikka 0f89380a3d kern/proc: expose reaper PID and subtree root in struct kinfo_proc
Expose process reaper metadata through struct kinfo_proc so userland
can reconstruct reaper hierarchies from kern.proc.all without adding
a new procctl(2) operation.

Two pid_t fields are added by carving 8 bytes from ki_sparestrings
(46 -> 38), restoring KI_NSPARE_INT to 2 and keeping sizeof(struct
kinfo_proc) unchanged:

  ki_reaper: PID of the owning reaper process
  ki_reapsubtree: PID of the direct child of the reaper that roots
                  the subtree the process belongs to

fill_kinfo_proc_pgrp() populates both fields under proctree_lock.
kvm_proclist() is updated for crash dump consumers. The freebsd32
compat struct and freebsd32_kinfo_proc_out() are updated accordingly.

PR:	293871
Reviewed by:	kib
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D56538
2026-04-22 02:36:07 +03:00
..
…
…
…
…
…
…