git://git.onelab.eu
/
nodemanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e57f1ee
)
use system-wide umask value otherwise all directories under /dev/cgroup and /vservers...
author
S.Çağlar Onur
<caglar@cs.princeton.edu>
Wed, 14 Jul 2010 17:15:39 +0000
(13:15 -0400)
committer
S.Çağlar Onur
<caglar@verivue.com>
Fri, 18 Mar 2011 19:31:13 +0000
(15:31 -0400)
tools.py
patch
|
blob
|
history
diff --git
a/tools.py
b/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.setsid()
if os.fork() != 0: os._exit(0)
os.chdir('/')
- os.umask(0)
+ os.umask(0
022
)
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
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