summaryrefslogtreecommitdiff
path: root/bitbake-dev/lib/bb/daemonize.py
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-10-17 20:11:27 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2009-10-17 20:11:27 +0100
commit627d9b1bde25422ccde4e313ee3c954b5c9b2932 (patch)
tree3bdf252f71ed0a1155bef212fbf8c7415bdc2788 /bitbake-dev/lib/bb/daemonize.py
parentf1216d2adbb0371deedec3a5060f377e8eb65d64 (diff)
downloadopenembedded-core-627d9b1bde25422ccde4e313ee3c954b5c9b2932.tar.gz
openembedded-core-627d9b1bde25422ccde4e313ee3c954b5c9b2932.tar.bz2
openembedded-core-627d9b1bde25422ccde4e313ee3c954b5c9b2932.zip
bitbake-dev: Sync with changes upstream
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake-dev/lib/bb/daemonize.py')
-rw-r--r--bitbake-dev/lib/bb/daemonize.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake-dev/lib/bb/daemonize.py b/bitbake-dev/lib/bb/daemonize.py
index 6023c9ccd2..1a8bb379f4 100644
--- a/bitbake-dev/lib/bb/daemonize.py
+++ b/bitbake-dev/lib/bb/daemonize.py
@@ -29,7 +29,8 @@ import sys # System-specific parameters and functions.
# Default daemon parameters.
# File mode creation mask of the daemon.
-UMASK = 0
+# For BitBake's children, we do want to inherit the parent umask.
+UMASK = None
# Default maximum for the number of available file descriptors.
MAXFD = 1024
@@ -107,7 +108,8 @@ def createDaemon(function, logfile):
if (pid == 0): # The second child.
# We probably don't want the file mode creation mask inherited from
# the parent, so we give the child complete control over permissions.
- os.umask(UMASK)
+ if UMASK is not None:
+ os.umask(UMASK)
else:
# Parent (the first child) of the second child.
os._exit(0)