[oe-commits] [bitbake] 11/15: server/process: Ensure socket has a timeout set

git at git.openembedded.org git at git.openembedded.org
Mon Feb 25 22:28:32 UTC 2019


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

rpurdie pushed a commit to branch 1.38
in repository bitbake.

commit e53c1009356cc49c57d3b9af1e3dda6927acd78d
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Fri Dec 14 17:49:16 2018 +0000

    server/process: Ensure socket has a timeout set
    
    We're seeing hangs in oe-selftest where server startup and shutdown are
    racing. The assumption was a connect would timeout however no timeout is
    set which can leave processes hanging. Set a short timeout for
    the connection to avoid this.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/server/process.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index a76b0a5..0854d48 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -473,6 +473,8 @@ def connectProcessServer(sockname, featureset):
     readfd = writefd = readfd1 = writefd1 = readfd2 = writefd2 = None
     eq = command_chan_recv = command_chan = None
 
+    sock.settimeout(2)
+
     try:
         try:
             os.chdir(os.path.dirname(sockname))

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


More information about the Openembedded-commits mailing list