Mail Archives: djgpp/1997/11/01/13:18:01
At 11:04 10/29/1997 GMT, Andreas Bierhals wrote:
>Hi John!
>
>Try using the function (in <stdlib.h>)
>
>int setenv(const char *name, const char *value, int rewrite);
>
>'rewrite' is a switch to decide whether to overwrite
>
>existing environment variables or to leave the old ones.
I'm afraid this doesn't do what he wants. Each process has its own copy of
the environment, which is usually propagated to its children. But what the
original poster wants to do is change a *parent's* environment, specifically
that of the master COMMAND.COM interpreter, so that *every* process, not
just his program's children, get the change. This is actually not supposed
to be possible to do, but there are ways...
Nate Eldredge
eldredge AT ap DOT net
- Raw text -