diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-20 12:25:19 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-20 12:26:19 +0100 |
commit | 616e75523b0b1bbe730631dba70224b55cfaaa57 (patch) | |
tree | 2fd396d58386217135976c1747ddfde94b84e9f8 /bitbake/bin | |
parent | 9708f9cba7923fa0b5a620e032ab3d9e085385a7 (diff) | |
download | poky-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-x | bitbake/bin/bitbake-runtask | 17 |
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 | ||
32 | import bb.event | 32 | import 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 | ||
37 | eventfd = os.dup(sys.stdout.fileno()) | 37 | eventfd = os.dup(sys.stdout.fileno()) |
38 | bb.event.worker_pipe = os.fdopen(eventfd, 'w', 0) | 38 | bb.event.worker_pipe = os.fdopen(eventfd, 'w', 0) |
39 | # Replace those fds with our own | 39 | |
40 | # map stdout to stderr | ||
40 | os.dup2(sys.stderr.fileno(), sys.stdout.fileno()) | 41 | os.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 |
44 | bb.event.worker_pid = os.getpid() | 52 | bb.event.worker_pid = os.getpid() |
45 | bb.event.usestdout = False | 53 | bb.event.useStdout = False |
46 | |||
47 | 54 | ||
48 | import bb.cooker | 55 | import bb.cooker |
49 | 56 | ||