Files
AnyPS5/docs/dev
babyhuey cf950fac5d feat(libkernel): answer kern.proc.pid for the calling process
Source Port (PPSA20040) checks whether a debugger is attached with
sysctl {CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()} into a 1,088-byte
buffer and tests P_TRACED (0x800) in ki_flag at offset 0x170; the MIB was
unsupported, so the title threw at start-up. Return a FreeBSD 11 amd64
kinfo_proc for the calling process with ki_structsize, ki_pid, ki_ppid and
ki_comm filled and every other field 0, so P_TRACED is clear. Like
kern.proc.vmmap, any other pid fails with ESRCH, a write with EPERM and a
short buffer with ENOMEM. The rest of the record is not measured on a
console and is recorded as debt.
2026-10-24 21:57:59 -04:00
..