summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-20 12:25:19 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-20 12:26:19 +0100
commit616e75523b0b1bbe730631dba70224b55cfaaa57 (patch)
tree2fd396d58386217135976c1747ddfde94b84e9f8 /bitbake/bin
parent9708f9cba7923fa0b5a620e032ab3d9e085385a7 (diff)
downloadpoky-616e75523b0b1bbe730631dba70224b55cfaaa57.tar.gz
bitbake: Correctly route events from the worker to the server
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/bitbake-runtask17
1 files changed, 12 insertions, 5 deletions
diff --git a/bitbake/bin/bitbake-runtask b/bitbake/bin/bitbake-runtask
index 417f3949cd..dee25cdf27 100755
--- a/bitbake/bin/bitbake-runtask
+++ b/bitbake/bin/bitbake-runtask
@@ -31,19 +31,26 @@ warnings.simplefilter("ignore", DeprecationWarning)
31 31
32import bb.event 32import bb.event
33 33
34# Need to map our I/O correctly. Currently stdout is a pipe to 34# Need to map our I/O correctly. stdout is a pipe to the server expecting
35# the server expecting events. We save this and map stdout to stderr. 35# events. We save this and then map stdout to stderr.
36 36
37eventfd = os.dup(sys.stdout.fileno()) 37eventfd = os.dup(sys.stdout.fileno())
38bb.event.worker_pipe = os.fdopen(eventfd, 'w', 0) 38bb.event.worker_pipe = os.fdopen(eventfd, 'w', 0)
39# Replace those fds with our own 39
40# map stdout to stderr
40os.dup2(sys.stderr.fileno(), sys.stdout.fileno()) 41os.dup2(sys.stderr.fileno(), sys.stdout.fileno())
41 42
43# Replace those fds with our own
44#logout = data.expand("${TMPDIR}/log/stdout.%s" % os.getpid(), self.cfgData, True)
45#mkdirhier(os.path.dirname(logout))
46#newso = open("/tmp/stdout.%s" % os.getpid(), 'w')
47#os.dup2(newso.fileno(), sys.stdout.fileno())
48#os.dup2(newso.fileno(), sys.stderr.fileno())
49
42# Save out the PID so that the event can include it the 50# Save out the PID so that the event can include it the
43# events 51# events
44bb.event.worker_pid = os.getpid() 52bb.event.worker_pid = os.getpid()
45bb.event.usestdout = False 53bb.event.useStdout = False
46
47 54
48import bb.cooker 55import bb.cooker
49 56