Hacker News new | ask | show | jobs
by CamJN 661 days ago
This is near and dear to my heart. I wanted to make a utility to get the arguments of other processes, and found after looking that every single use of the KERN_PROCARGS2 sysctl (used on macOS) on the internet is wrong (they assume argv[0] is not an empty string), including Apple's and Google's. So after making my utility I also made a library out of it, both are bsd-3, but non-gratis: https://getargv.narzt.cam/
2 comments

On a related note, env vars do not have to be of the form key=value, they are arbitrary NUL-terminated byte strings just like the args.
Is this a parody?