Enhancement/Clarification for man sysctl(3)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 11 Sep 2026 06:50:29 UTC
There is no mention of the need to include <sys/user.h> in order to expose the kinfo_proc. It does mention (mainly) redundant information such as this: The top level names are defined with a CTL_ prefix in <sys/sysctl.h>, and are as follows. The next and subsequent levels down are found in the include files listed here, and described in separate sections below. Name Next Level Names Description CTL_DEBUG <sys/sysctl.h> Debugging CTL_VFS <sys/mount.h> File system CTL_HW <sys/sysctl.h> Generic CPU, I/O CTL_KERN <sys/sysctl.h> High kernel limits CTL_MACHDEP <sys/sysctl.h> Machine dependent CTL_NET <sys/socket.h> Networking CTL_USER <sys/sysctl.h> User-level CTL_VM <vm/vm_param.h> Virtual memory And yet not a mention of <sys/user.h>??? How about, at least something like "Applications examining records returned by KERN_PROC should include <sys/user.h> for the definition of struct kinfo_proc." Thanks