[oe-commits] [bitbake] 02/02: server/process: Ensure we don't loop on client EOFError

git at git.openembedded.org git at git.openembedded.org
Wed Aug 9 09:57: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 2bc47e887c3b41417edaa89a8708c223fd2085de
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Tue Aug 8 20:55:21 2017 +0100

    server/process: Ensure we don't loop on client EOFError
    
    The server currently crashes if we hit an EOFError due to controllersock
    still being in ready and the continue meaning ready isn't re-evaluated.
    Setting the value to False can mean the shutdown code doesn't handle the
    situation cleanly.
    
    Clear ready to avoid the crash/loop instead and handle any OSError whilst
    we're in here.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/server/process.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 338c448..ee8b14e 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -164,7 +164,7 @@ class ProcessServer(multiprocessing.Process):
 
                     self.haveui = True
 
-                except EOFError:
+                except (EOFError, OSError):
                     print("Disconnecting Client")
                     fds.remove(self.controllersock)
                     fds.remove(self.command_channel)
@@ -190,7 +190,7 @@ class ProcessServer(multiprocessing.Process):
                     command = self.command_channel.get()
                 except EOFError:
                     # Client connection shutting down
-                    self.command_channel = False
+                    ready = []
                     continue
                 if command[0] == "terminateServer":
                     self.quit = True

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


More information about the Openembedded-commits mailing list