summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server/process.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-12 23:27:25 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-14 23:05:15 +0100
commitbfc21fd9b23ff62c1dc422b606b289f2457f29e5 (patch)
tree571ea7070ca70488f74d7485d6f07ef2e21455b8 /bitbake/lib/bb/server/process.py
parent471310e5e75d35e572edd1a5638aa3999439e2f3 (diff)
downloadpoky-bfc21fd9b23ff62c1dc422b606b289f2457f29e5.tar.gz
bitbake: server/process: Fix missing log messages issue
Currently if the server dies, its possible that log messages are never displayed which is particularly problematic if one of those messages is the exception and backtrace the server died with. Rather than having the event queue exit as soon as the server disappears, we should pop events from the queue until its empty before exiting. This patch tweaks that code so that even if the server is dead and we're going to exit, we return any events left in the pipe. This makes debugging certain failures much easier. (Bitbake rev: 29f6ade68fb2b506a23a7eb3a00cdcffa291b362) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server/process.py')
-rw-r--r--bitbake/lib/bb/server/process.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index a3078a873d..cc58c720a2 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -222,11 +222,10 @@ class ProcessEventQueue(multiprocessing.queues.Queue):
222 222
223 def waitEvent(self, timeout): 223 def waitEvent(self, timeout):
224 if self.exit: 224 if self.exit:
225 sys.exit(1) 225 return self.getEvent()
226 try: 226 try:
227 if not self.server.is_alive(): 227 if not self.server.is_alive():
228 self.setexit() 228 return self.getEvent()
229 return None
230 return self.get(True, timeout) 229 return self.get(True, timeout)
231 except Empty: 230 except Empty:
232 return None 231 return None
@@ -235,9 +234,10 @@ class ProcessEventQueue(multiprocessing.queues.Queue):
235 try: 234 try:
236 if not self.server.is_alive(): 235 if not self.server.is_alive():
237 self.setexit() 236 self.setexit()
238 return None
239 return self.get(False) 237 return self.get(False)
240 except Empty: 238 except Empty:
239 if self.exit:
240 sys.exit(1)
241 return None 241 return None
242 242
243 243