diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-12-17 10:12:46 -0600 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2010-12-17 09:35:34 -0700 |
commit | b0cbc728e5285f71d043458b4db71ea6bae7e0cd (patch) | |
tree | 953d175f430ee840bcf465d0ce560d4c4d6048ef /bin/bitbake | |
parent | db56f34e22e9a7c425f59d8f946c60e0a63f5f75 (diff) | |
download | bitbake-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-x | bin/bitbake | 8 |
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: |