diff options
author | Chris Larson <clarson@mvista.com> | 2009-08-27 12:20:10 -0700 |
---|---|---|
committer | Chris Larson <clarson@mvista.com> | 2009-08-27 12:20:10 -0700 |
commit | 30d00e1a550931cb7f62e6574a7dd2d7b33f182b (patch) | |
tree | 9fb53c3980f195eff672cb9e3a785d9afd5bf19a /lib/bb/daemonize.py | |
parent | b33543799373ea57f4b7da07de5369031c3f9e14 (diff) | |
download | bitbake-30d00e1a550931cb7f62e6574a7dd2d7b33f182b.tar.gz |
daemonize: Kill the forcing of umask to 0 in our children.
It forces the daemon umask to the module level UMASK variable, which defaults
to 0, so the bitbake daemons end up with a umask of 0. Fixed by setting UMASK
to None and making it only run umask when it's not None, so our children will
inherit the parent umask
Signed-off-by: Chris Larson <clarson@mvista.com>
Diffstat (limited to 'lib/bb/daemonize.py')
-rw-r--r-- | lib/bb/daemonize.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bb/daemonize.py b/lib/bb/daemonize.py index 6023c9ccd..1a8bb379f 100644 --- a/lib/bb/daemonize.py +++ b/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)
|