Be careful when touching process-global state when writing charm
hooks. Calling out to the juju tools such as config-get will inherit
the normal C environment, and juju may break in surprising ways if you
don't leave it how you found it.

Yolanda had this problem today, when trying to use setuid in a script.
What is the best way of handling that? For things like the working
directory, just doing try/finally and reverting the value is fine, or
in python invoking a subprocess in the desired location. To switch
user, forking and waiting for the fork to complete seems safest?

Martin

-- 
Juju mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju

Reply via email to