use system-wide umask value otherwise all directories under /dev/cgroup and /vservers...
authorS.Çağlar Onur <caglar@cs.princeton.edu>
Wed, 14 Jul 2010 17:15:39 +0000 (13:15 -0400)
committerS.Çağlar Onur <caglar@verivue.com>
Fri, 18 Mar 2011 19:31:13 +0000 (15:31 -0400)
tools.py

index 9590b57..199d799 100644 (file)
--- a/tools.py
+++ b/tools.py
@@ -54,7 +54,7 @@ def daemon():
     os.setsid()
     if os.fork() != 0: os._exit(0)
     os.chdir('/')
-    os.umask(0)
+    os.umask(0022)
     devnull = os.open(os.devnull, os.O_RDWR)
     os.dup2(devnull, 0)
     # xxx fixme - this is just to make sure that nothing gets stupidly lost - should use devnull