[gnome-continuous-yocto/gnomeostree-3.28-rocko: 7000/8267] bitbake: process: Allow BBUIEventQueue to exit cleanly
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 7000/8267] bitbake: process: Allow BBUIEventQueue to exit cleanly
- Date: Sun, 17 Dec 2017 05:38:02 +0000 (UTC)
commit 76b6cdf414ac813783646d0456865fd20d89195f
Author: Richard Purdie <richard purdie linuxfoundation org>
Date: Fri Jul 28 15:33:32 2017 +0100
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>
bitbake/lib/bb/server/process.py | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index 8a7c431..3d9077f 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):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]