[oe-commits] [bitbake] 03/07: process: Allow BBUIEventQueue to exit cleanly

git at git.openembedded.org git at git.openembedded.org
Fri Jul 28 15:03:43 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 930d077637928213e13a07c78fee3bf7a8c37ebf
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Fri Jul 28 15:33:32 2017 +0100

    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.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/server/process.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 8a7c431..3d9077f 100644
--- a/lib/bb/server/process.py
+++ b/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):
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list