summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server/process.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-28 15:33:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-30 08:43:36 +0100
commit76b6cdf414ac813783646d0456865fd20d89195f (patch)
tree26dd641ce73958ea471ddb32d21017dd61983be2 /bitbake/lib/bb/server/process.py
parent8b7aa5bfd6a53444df60d789c6a7ed2387e7b4c1 (diff)
downloadopenembedded-core-contrib-76b6cdf414ac813783646d0456865fd20d89195f.tar.gz
bitbake: process: Allow BBUIEventQueue to exit cleanly
Currently the monitoring thread exits with some error code or runs indefinitely. Allow closure of the pipe its monitoring to have the thread exit cleanly/silently. (Bitbake rev: 930d077637928213e13a07c78fee3bf7a8c37ebf) 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.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index 8a7c43160a..3d9077fd07 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -499,9 +499,14 @@ class BBUIEventQueue:
def startCallbackHandler(self):
bb.utils.set_process_name("UIEventQueue")
while True:
- self.reader.wait()
- event = self.reader.get()
- self.queue_event(event)
+ try:
+ self.reader.wait()
+ event = self.reader.get()
+ self.queue_event(event)
+ except EOFError:
+ # Easiest way to exit is to close the file descriptor to cause an exit
+ break
+ self.reader.close()
class ConnectionReader(object):