summaryrefslogtreecommitdiff
path: root/bitbake/bin/bitbake-runtask
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/bitbake-runtask
parent9708f9cba7923fa0b5a620e032ab3d9e085385a7 (diff)
downloadopenembedded-core-616e75523b0b1bbe730631dba70224b55cfaaa57.tar.gz
openembedded-core-616e75523b0b1bbe730631dba70224b55cfaaa57.tar.bz2
openembedded-core-616e75523b0b1bbe730631dba70224b55cfaaa57.zip
bitbake: Correctly route events from the worker to the server
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/bin/bitbake-runtask')
-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)
import bb.event
-# Need to map our I/O correctly. Currently stdout is a pipe to
-# the server expecting events. We save this and map stdout to stderr.
+# Need to map our I/O correctly. stdout is a pipe to the server expecting
+# events. We save this and then map stdout to stderr.
eventfd = os.dup(sys.stdout.fileno())
bb.event.worker_pipe = os.fdopen(eventfd, 'w', 0)
-# Replace those fds with our own
+
+# map stdout to stderr
os.dup2(sys.stderr.fileno(), sys.stdout.fileno())
+# Replace those fds with our own
+#logout = data.expand("${TMPDIR}/log/stdout.%s" % os.getpid(), self.cfgData, True)
+#mkdirhier(os.path.dirname(logout))
+#newso = open("/tmp/stdout.%s" % os.getpid(), 'w')
+#os.dup2(newso.fileno(), sys.stdout.fileno())
+#os.dup2(newso.fileno(), sys.stderr.fileno())
+
# Save out the PID so that the event can include it the
# events
bb.event.worker_pid = os.getpid()
-bb.event.usestdout = False
-
+bb.event.useStdout = False
import bb.cooker