Re:Linux /proc/pid/stat parsing bugs
by CamJN on Thursday December 22, 2022 @12:12PM
(#34095714)
MacOS’ KERN_PROCARGS2 sysctl is an exception to this, it is very unintuitive to parse and every single piece of code that tries to parse the results that I’ve found on the internet has been wrong, including those from Apple, Google, and Microsoft. I wound up making a library to do it (https://getargv.narzt.cam/) because apparently people need help.
[ Parent
| on HN ]
Re:Linux /proc/pid/stat parsing bugs
by convolvatron on Thursday December 22, 2022 @04:36PM
(#34099075)
I just ran into this and its not documented and there are very examples. I will definitely be looking at your library, thank you.
it sounds fishy, but just because sysctl is a mess doesn't necessarily imply that structured kernel interfaces are a bad idea