summaryrefslogtreecommitdiffstats
path: root/bin/bitbake
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-12-17 10:12:46 -0600
committerChris Larson <chris_larson@mentor.com>2010-12-17 09:35:34 -0700
commitb0cbc728e5285f71d043458b4db71ea6bae7e0cd (patch)
tree953d175f430ee840bcf465d0ce560d4c4d6048ef /bin/bitbake
parentdb56f34e22e9a7c425f59d8f946c60e0a63f5f75 (diff)
downloadbitbake-b0cbc728e5285f71d043458b4db71ea6bae7e0cd.tar.gz
bin/bitbake: [HACK] Empty ui event queue on shutdown
This is a workaround to ensure the user always sees any queued up log messages, even if the UI has shut down without showing them. This is far from ideal. The correct fix is to alter the UIs to shut down more cleanly, ensuring they display any remaining queued up events to the user before they exit. Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'bin/bitbake')
-rwxr-xr-xbin/bitbake8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/bitbake b/bin/bitbake
index 10cce2d13..63b1d1d12 100755
--- a/bin/bitbake
+++ b/bin/bitbake
@@ -42,6 +42,7 @@ from bb import ui
from bb import server
from bb.server.process import ProcessServer, ServerCommunicator
+from Queue import Empty
from multiprocessing import Queue, Pipe
__version__ = "1.11.0"
@@ -205,6 +206,13 @@ Default BBFILES are the .bb files in the current directory.""")
server.join()
else:
server.join()
+ while True:
+ try:
+ event = event_queue.get(block=False)
+ except Empty:
+ break
+ if isinstance(event, logging.LogRecord):
+ logger.handle(event)
ui_channel.close()
event_queue.close()
if force: