gopsutil
gopsutil copied to clipboard
LSB release fixes
See individual commits and their messages for more info.
The last change reorders things, making the combined patch a bit hard to read, but reviewing each commit separately gives a clearer picture.
Fair point re exec vs file read. Still leaning towards standards, but I'll let you guys decide.
One thing we could do to mitigate -- no matter actually which one is checked first -- is to grab the LSB values only when they are actually needed. Currently for a bunch of cases, they are retrieved but not used. One thing to take into account when/if implementing that is the precedence of distro specific file vs /etc/os-release: if we simply move the blocks that require LSB info to be checked after others that don't, /etc/os-release starts to take precedence e.g. over Debian and Arch specific files, and at least the Debian one seems more featureful than /etc/os-release.