On 1/21/2009 at 2:03 PM, "Dominique Leuenberger" <Dominique.Leuenberger@TMF-Group.com> wrote:
On 1/21/2009 at 2:00 PM, Dave Plater <dave.plater@yahoo.co.uk> wrote: Dominique Leuenberger wrote: bash (env0) yast2 (env0.1) yast2-doSomething (env0.1.1) zypper (env0.2)
you as user in bash modify env0, yast will only have access to env0.1 (not a problem of yast, it's the way process spawning deals with environments)
Just a very simple example showing you that this is not possible: create a bash script like: ---- snip ---- #!/bin/bash echo Testvar has value $testvar unset testvar echo Testvar has value $testvar ---- snip ---- No in your bash:
export testvar="Test data" sh myscript.sh echo Testvar has value $testvar
Testvar has value Test data Testvar has value Testvar has value Test Data (the first two echos come from the script.. so it inherited testvar from your bash. it unsets the variable afterwards and you can confirm this with the echo which does no longer have a value. As soon as the script is over, you get back to your console where you can verify that the changed variable is not given back to the parent shell. I hope this helps to show the way environments are handled. Dominique -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org