diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-10-17 20:11:27 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-10-17 20:11:27 +0100 |
commit | 627d9b1bde25422ccde4e313ee3c954b5c9b2932 (patch) | |
tree | 3bdf252f71ed0a1155bef212fbf8c7415bdc2788 /bitbake-dev/lib/bb/daemonize.py | |
parent | f1216d2adbb0371deedec3a5060f377e8eb65d64 (diff) | |
download | poky-627d9b1bde25422ccde4e313ee3c954b5c9b2932.tar.gz |
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.py | 6 |
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. |
32 | UMASK = 0 | 32 | # For BitBake's children, we do want to inherit the parent umask. |
33 | UMASK = None | ||
33 | 34 | ||
34 | # Default maximum for the number of available file descriptors. | 35 | # Default maximum for the number of available file descriptors. |
35 | MAXFD = 1024 | 36 | MAXFD = 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) |