Re: Environment variable
> All of those things would still be environment variables, just by another name.
Hmm, careful of those goalposts.
env vars are quite specific things, we all know precisely what they are: string name/value pairs that are set by the parent process (oops, that starts from Init, doesn't actually have to be the OS - although an OS might provide a bit of support, it really does not need to), the process can modify its own and is responsible for setting up the environment variables for its child processes - which can just default to being a copy of its own. The child process is set up by a call to, e.g. a glibc function - which function uses the OS to create a new process and then afterwards sets up the environment, just as it sets up the command line parameters. The functions you use to access the environment - getenv(), setenv() - are equally part of glibc.
What you consider to be "the environment" when you use "set" etc in your console are all values that are managed by your shell - initially set up by exec'ing startup scripts and reading config files, plus what was inherited from init.
Now, glibc is not "the OS" - even the article points out glibc can be replaced, so it itself isn't a fundamental and nor is the specific way it stores the env vars. They can be shoved onto the process stack, before *or* after the command line options, or both (weird, but it is one way of allowing setenv() to get more space), or they can be put into a newly malloc'ed block: so long as the caller and the callee agree (usually because they are linked against the same glibc-or-equivalent) then anything goes.
The closest this gets to being "OS defined" is by the statement "init, the shell and the other utilities provided here are, today, linked against this glibc-or-equivalent (and it may change when you get an update, a big one mind, tomorrow afternoon); if you are not also linked to the same then the onus is entirely on you to deal with any differences". So, you can, fairly, say that that choice has been set "for the OS you happen to be running, because you need more than just the kernel to make a complete OS (for certain large sizes of OS)" but you can also see that the choice is pretty arbitrary and need not even support the concept of env vars. It is functionally possible to do without any of these env vars - and I remind you of the overarching claim made in the comment I was replying to (see below).
You can also, again very fairly, argue that, if I remove glibc and its replacement does not provide the usual env vars then what you are left with "is not a recognisable Linux OS" and I would agree with you: but it would still be a perfectly functioning multiprocessing OS, albeit one without lots of the programs you have come to rely on (although many could be ported over, just to make a point).
> passed onward to arbitrary child processes by some OS-defined method
Nope, not all OSes define such things - read the above for a description of how the OS need not give a fig about env vars and also have a look at embedded OSes (and I do not mean just shoving Linux into a headless box). You may - or may not - decide to use one of the other concepts I mentioned previously (the mutexed counter for example) between your own processes, to let one know it is the Xth instance so do this slightly different thing, but that need not be dictated by the OS.
Unless you actually *do* want to start moving the goalposts, recall that I was responding to a very specific, very clear and very overarching statement; just in case you missed it, here it is again:
> Every OS has environment variables. It's absolutely necessary for a multiprocessing OS to work. Otherwise it would be impossible for a new process to learn the specific setup for a particular invocation.
Note that he clearly said "absolutely necessary for a multiprocessing OS to work".
Not Linux or Windows, but *any* and *every* multiprocessing OS, no matter how big or how small, no matter how widely used or how niche, no matter how easy to use and program for or how much of a total pain it may be.