mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
The new ptrace(2) features allow to change truss(1) to systematically operate on the process descriptors instead of pids. Allocate the global kqueue that tracks all noted children by pdopenpid()-ing them and adding to the kqueue with EVFILT_PROCDESC/NOTE_PDSIGCHLD. The activated knote triggers the pdwait() call to return the child tracing info. This replaces the waitid(P_ALL) call in the non-capsicumized truss(1) eventloop. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D58094