diff options
author | Julien Cristau <julien.cristau@logilab.fr> | 2012-03-15 13:35:19 +0100 |
---|---|---|
committer | Julien Cristau <julien.cristau@logilab.fr> | 2012-03-15 13:35:19 +0100 |
commit | 27e22487d92741e52c12e346123830a08f05243c (patch) | |
tree | 61e11a82f29888500d050c7de1658cc0a9595158 | |
parent | 508c6d7c999d9541b0d2eff09b1b1437a0ab29cd (diff) | |
download | logilab-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.
-rw-r--r-- | daemon.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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): |