Friedrich Psiorz
2012-06-08 23:44:28 UTC
The reason seems to be that while creating a variable foo
in rc is immediately reflected to /env/foo, the reverse is
not true. That is, creating a new file under /env/baz does
not update the current rc instance with a new variable $baz
So in this case, putenv is actually writing to /env/foo,
and it would be visible only if you start a new rc
instance. (or just read from the same file.)
Ok, so I got the whole idea wrong, I guess. I thought that $var isin rc is immediately reflected to /env/foo, the reverse is
not true. That is, creating a new file under /env/baz does
not update the current rc instance with a new variable $baz
So in this case, putenv is actually writing to /env/foo,
and it would be visible only if you start a new rc
instance. (or just read from the same file.)
basically just syntactic sugar for `{cat /env/var}, so referencing a
variable would always read from /env ...
I don't really understand how and why this is not the case though, but
I'll try to find out by reading a few more manpages ...