On Mar 2, 2009, at 12:04 AM, Timothy S. Nelson wrote:
Hi. I note that we have $?OS, $?VM, and $?DISTRO (and their $*
counterparts). I'd like to recommend that we eliminate $?OS, and
replace it with $?KERNEL (ie. Linux) and maybe $?ARCH (ie. i386).
Thoughts?
I disagree.
User-space code cares much more deeply about the operating system than
the kernel, largely thanks to libc or the equivalent. For example,
BSD systems can be built on a number of different kernels. Mac OS X
is in principle FreeBSD on Mach, but there are a huge number
differences from "plain" FreeBSD that have nothing to do with Mach.
Instead, it would be even more useful to represent $?OS.family, $?
OS.version.major, $?OS.version.minor, etc. Linux distros often
support switching kernel versions out from under the OS.
% uname -mprsv
Darwin 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST
2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 i386
Chris