Mail Archives: djgpp/1997/02/03/12:26:57
On Mon, 3 Feb 1997, Chris A. Triebel wrote:
> I was wondering, is it possible to set an enviroment variable in the
> parent shell using a djgpp program. I noted putenv() which states that
> it changes the program's variables, and setenv(). I had hoped setenv()
> would do this, but it seems like it only sets the program's env.
This is in general not possible without using undocumented DOS
structures. There is no library function in DJGPP that implements such
functionality (`setenv' and `putenv' aren't supposed to do that, they
only change the environment of the calling program and all the programs
it spawns).
> My above line of thought was to store the push/pop stack in an enviroment
> and manipulate it in my program. This seemed the easiest to manage.
Call pushd/popd from a batch file. A batch file can set an environment
variable in its shell.
> And as for bash I
> haven't quite got that configured properly, it seems that when I run vim
> I get trash on my screen ( wrong term setting ), and I am not familiar
> enough with bash, yet, to set it up properly. If anyone has any advice
> on this topic I would be appreciative, but I haven't done much in the way
> of research yet, so I won't ask more than that ...
First, get the latest version of bash, such problems get constantly
corrected there. (An announcement was posted here about bashb6.zip just
a day ago.) If the problem persists, post a detailed description here:
the author of the bash port reads this news group and will either suggest
a solution or fix the bug.
- Raw text -