summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/event.py11
-rw-r--r--bitbake/lib/bb/server/process.py2
-rw-r--r--bitbake/lib/bb/server/xmlrpc.py2
3 files changed, 12 insertions, 3 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py
index 1462382f10..d5c5ef3544 100644
--- a/bitbake/lib/bb/event.py
+++ b/bitbake/lib/bb/event.py
@@ -212,6 +212,12 @@ def fire(event, d):
212 if worker_fire: 212 if worker_fire:
213 worker_fire(event, d) 213 worker_fire(event, d)
214 else: 214 else:
215 # If messages have been queued up, clear the queue
216 global _uiready, ui_queue
217 if _uiready and ui_queue:
218 for queue_event in ui_queue:
219 fire_ui_handlers(queue_event, d)
220 ui_queue = []
215 fire_ui_handlers(event, d) 221 fire_ui_handlers(event, d)
216 222
217def fire_from_worker(event, d): 223def fire_from_worker(event, d):
@@ -291,7 +297,10 @@ def register_UIHhandler(handler, mainui=False):
291 _ui_logfilters[_ui_handler_seq] = UIEventFilter(level, debug_domains) 297 _ui_logfilters[_ui_handler_seq] = UIEventFilter(level, debug_domains)
292 return _ui_handler_seq 298 return _ui_handler_seq
293 299
294def unregister_UIHhandler(handlerNum): 300def unregister_UIHhandler(handlerNum, mainui=False):
301 if mainui:
302 global _uiready
303 _uiready = False
295 if handlerNum in _ui_handlers: 304 if handlerNum in _ui_handlers:
296 del _ui_handlers[handlerNum] 305 del _ui_handlers[handlerNum]
297 return 306 return
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index 9ca2b6958d..f8d6767855 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -137,7 +137,7 @@ class ProcessServer(Process, BaseImplServer):
137 logger.exception('Running command %s', command) 137 logger.exception('Running command %s', command)
138 138
139 self.event_queue.close() 139 self.event_queue.close()
140 bb.event.unregister_UIHhandler(self.event_handle.value) 140 bb.event.unregister_UIHhandler(self.event_handle.value, True)
141 self.command_channel.close() 141 self.command_channel.close()
142 self.cooker.shutdown(True) 142 self.cooker.shutdown(True)
143 self.quitout.close() 143 self.quitout.close()
diff --git a/bitbake/lib/bb/server/xmlrpc.py b/bitbake/lib/bb/server/xmlrpc.py
index a06007f5ac..d0f5a6d6da 100644
--- a/bitbake/lib/bb/server/xmlrpc.py
+++ b/bitbake/lib/bb/server/xmlrpc.py
@@ -125,7 +125,7 @@ class BitBakeServerCommands():
125 """ 125 """
126 Unregister a remote UI Event Handler 126 Unregister a remote UI Event Handler
127 """ 127 """
128 return bb.event.unregister_UIHhandler(handlerNum) 128 return bb.event.unregister_UIHhandler(handlerNum, True)
129 129
130 def runCommand(self, command): 130 def runCommand(self, command):
131 """ 131 """