NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Silly shell question
On Tue, 22 Mar 2016 15:07:09 -0600 (MDT)
Swift Griggs <swiftgriggs%gmail.com@localhost> wrote:
> Thanks for the info, but do you happen to know what the actual mechanism
> that the child processes is able to "import" the exported variable ? Ie..
> is it some special OS glue/magic, or is it just straight getenv() calls by
> the client shell/app ? I don't see anything magical in the man page for
> getenv() that would distinguish an exported versus non-exported variable.
It's really simple: Exported variables are in the environment (i.e. getenv/setenv). Non-exported variables are just a table inside of the shell process itself. They have no special meaning to the OS.
--
Benny Siegert <bsiegert%gmail.com@localhost>
Home |
Main Index |
Thread Index |
Old Index