Re:Understanding /proc
by geofft on Wednesday October 05, 2016 @01:20AM
(#12641710)
There are a couple of options. A good number of other UNIXes do in fact have a procfs. Some others, like macOS, have a system call that gives you the information you want (on macOS this is a sysctl, CTL_KERN / KERN_PROC / KERN_PROC_ALL, which returns a set of structs). And finally, especially on older UNIXes, the ps command is setuid root, and goes and opens /dev/kmem or similar and looks around in kernel memory and parses the live kernel's process table directly.
[ Parent
| on HN ]
There are no comments on this comment yet.