[vox-tech] Bash script to setup environment variables

Ricardo Anguiano vox-tech@lists.lugod.org
28 Dec 2001 08:50:03 -0800


How about using signals?  The sub-process can handle the signal by
parsing a variable file you designate at compile time.  The signal
handler can then redefine environment variables with setenv(3).

-Ricardo

"Mark K. Kim" <markslist@cbreak.org> writes:

> Keywords: bash, script, environment variables
> 
> Hello folks...
> 
> I'm doing some cross-compilation work so I need to flip environment
> variables on/off in a heartbeat.  I tried to write a script, but scripts
> run on sub-processes so the changes do not take effect on the parent
> process.  Is there a way, without having to type `source script` or `.
> script`, to make environment variables changes take place on the running
> process?
> 
> Thanks in adv!
> 
> -Mark
> 
> --
> Mark K. Kim
> http://www.cbreak.org/mark/
> PGP key available upon request.
> 
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech