delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/01/13:18:01

Date: Sat, 1 Nov 1997 10:11:24 -0800 (PST)
Message-Id: <199711011811.KAA18366@adit.ap.net>
Mime-Version: 1.0
To: "Andreas Bierhals" <bierhals AT studserv DOT stud DOT uni-hannover DOT de>,
djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: DOS stuff

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019