summaryrefslogtreecommitdiffstats
path: root/bitbake-dev/lib/bb/daemonize.py
diff options
context:
space:
mode:
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.
29 29
30# Default daemon parameters. 30# Default daemon parameters.
31# File mode creation mask of the daemon. 31# File mode creation mask of the daemon.
32UMASK = 0 32# For BitBake's children, we do want to inherit the parent umask.
33UMASK = None
33 34
34# Default maximum for the number of available file descriptors. 35# Default maximum for the number of available file descriptors.
35MAXFD = 1024 36MAXFD = 1024
@@ -107,7 +108,8 @@ def createDaemon(function, logfile):
107 if (pid == 0): # The second child. 108 if (pid == 0): # The second child.
108 # We probably don't want the file mode creation mask inherited from 109 # We probably don't want the file mode creation mask inherited from
109 # the parent, so we give the child complete control over permissions. 110 # the parent, so we give the child complete control over permissions.
110 os.umask(UMASK) 111 if UMASK is not None:
112 os.umask(UMASK)
111 else: 113 else:
112 # Parent (the first child) of the second child. 114 # Parent (the first child) of the second child.
113 os._exit(0) 115 os._exit(0)