summaryrefslogtreecommitdiff
path: root/daemon.py
diff options
context:
space:
mode:
authorJulien Cristau <julien.cristau@logilab.fr>2012-03-15 13:35:19 +0100
committerJulien Cristau <julien.cristau@logilab.fr>2012-03-15 13:35:19 +0100
commit27e22487d92741e52c12e346123830a08f05243c (patch)
tree61e11a82f29888500d050c7de1658cc0a9595158 /daemon.py
parent508c6d7c999d9541b0d2eff09b1b1437a0ab29cd (diff)
downloadlogilab-common-27e22487d92741e52c12e346123830a08f05243c.tar.gz
[daemon] don't call putenv directly
assigning to os.environ will call putenv as needed, whereas calling putenv won't update python's idea of the environment properly.
Diffstat (limited to 'daemon.py')
-rw-r--r--daemon.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon.py b/daemon.py
index c8342a8..66a6960 100644
--- a/daemon.py
+++ b/daemon.py
@@ -46,7 +46,7 @@ def setugid(user):
raise OSError(err, os.strerror(err), 'initgroups')
os.setgid(passwd.pw_gid)
os.setuid(passwd.pw_uid)
- os.putenv('HOME', passwd.pw_dir)
+ os.environ['HOME'] = passwd.pw_dir
def daemonize(pidfile=None, uid=None, umask=077):