From 627d9b1bde25422ccde4e313ee3c954b5c9b2932 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 17 Oct 2009 20:11:27 +0100 Subject: bitbake-dev: Sync with changes upstream Signed-off-by: Richard Purdie --- bitbake-dev/lib/bb/daemonize.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bitbake-dev/lib/bb/daemonize.py') 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) -- cgit v1.2.3