what does export do?

Les Mikesell lesmikesell at gmail.com
Sun May 22 01:16:28 UTC 2005


On Sat, 2005-05-21 at 19:09, THUFIR HAWAT wrote:
> On 5/20/05, Markku Kolkka <markkuk at tuubi.net> wrote:
> ...
> > In Linux a new process inherits the initial set of environment 
> > variables from its parent process
> ...
> 
> so, when a command is entered it winds its way "up" (or down) until a
> match is found.  hmm, think must I on this.

No, new processes start as a copy-on-write copy of the parent's
memory.  Thus anything set in the parent is automatically set
in the child, but changes made by the child can't affect the
parent's copy - and reasonable memory management hardware makes
this a very cheap operation since the memory isn't really copied
unless it is changed.

-- 
  Les Mikesell
   lesmikesell at gmail.com





More information about the fedora-list mailing list