Mail Archives: djgpp/1997/12/18/08:30:36
DongJun Kim wrote:
>
> I want to remain my enviroment if my program terminated or not.
> I used putenv( "MYPROG=C:/LANG/MYPROG.CFG" ) in my program.
>
> But after terminated, it is not in enviroment variables.
> ( I checked it by typing "SET" )
>
> What have to I do now?
Every program inherits a private copy of the environment from the master
environment when it starts. putenv() modifies that private copy of the
environment only. When your program terminates, that private copy of
the environment is gone with it, along with it your modifications.
To modify the master environment, you need to find it.
--
Weiqi Gao
weiqigao AT a DOT crl DOT com
- Raw text -