View Single Post
  #9   (View Single Post)  
Old 4th June 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,546
Default

Once your shells environment is modified, all programs executed from that shell after the change will understand the change.

Placing the setting in your shells config file will make it perminate for all new shells, and you can have the current shell read the configuration again (e.g. use: . ~/.profile)


Programs executed before the change but still running will probably not (reliably) take notice.


In C programs you would probably use getenv() to look up an environment variable, whether or not the 'current environment' in my manual page refers to a copy of the environment created by the programs process or a hook into the parent processes current environment, I don't know since I've never tested it or read the standard on it.

But I'd expect it to be a copy of the environment taken when the process is created.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote