]> code.ossystems Code Review - openembedded-core.git/commitdiff
Use os.devnull, not /dev/null
authorChris Larson <chris_larson@mentor.com>
Mon, 20 Dec 2010 02:30:49 +0000 (19:30 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 4 Jan 2011 14:46:52 +0000 (14:46 +0000)
(Bitbake rev: ce5ab0fc524a1c2c48c4c39d6fc8aae23019207b)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/build.py
bitbake/lib/bb/runqueue.py

index 4f8ac9573badf61f50a4f24bebce730e8d8941fa..44ad3965a2039952fa1d7381bb9cee099c9f2018 100644 (file)
@@ -38,8 +38,7 @@ from bb import data, event, mkdirhier, utils
 bblogger = logging.getLogger('BitBake')
 logger = logging.getLogger('BitBake.Build')
 
-NULL = open('/dev/null', 'r')
-
+NULL = open(os.devnull, 'r+')
 
 # When we execute a python function we'd like certain things
 # in all namespaces, hence we add them to __builtins__
index d4cea7d5d419967cf1ae40e7cdb7f74f25b01482..ee7cfe7d61aaad15a771658c96483b0d1ff0394d 100644 (file)
@@ -1140,7 +1140,7 @@ class RunQueueExecute:
             # Make the child the process group leader
             os.setpgid(0, 0)
             # No stdin
-            newsi = os.open('/dev/null', os.O_RDWR)
+            newsi = os.open(os.devnull, os.O_RDWR)
             os.dup2(newsi, sys.stdin.fileno())
             # Stdout to a logfile
             #logout = data.expand("${TMPDIR}/log/stdout.%s" % os.getpid(), self.cfgData, True)