summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-24 16:32:18 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-28 17:03:14 +0000
commit563a74d52270ebe0db5bec5802a1c820ab88a999 (patch)
tree0b7963a85e4bbcdd89cf3b980ca376838c07e247 /bitbake
parent86209d43654ee924cca0ae078c729c2f82386225 (diff)
downloadpoky-563a74d52270ebe0db5bec5802a1c820ab88a999.tar.gz
bitbake: process: Handle EWOULDBLOCK in socket connect
Now that we set a timeout for the socket, it can return EWOULDBLOCK if a signal or other event happens to wake up even if we don't timeout. If this happens, retry the connection, else we simply see it quickly loop through the retries and abort the connection in a very short interval. (Bitbake rev: c2000651a200530ba08161207ade5eea8bbeec43) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/server/process.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index f1fbe3313c..1e4b51e35e 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -479,7 +479,14 @@ def connectProcessServer(sockname, featureset):
479 try: 479 try:
480 try: 480 try:
481 os.chdir(os.path.dirname(sockname)) 481 os.chdir(os.path.dirname(sockname))
482 sock.connect(os.path.basename(sockname)) 482 finished = False
483 while not finished:
484 try:
485 sock.connect(os.path.basename(sockname))
486 finished = True
487 except IOError as e:
488 if e.errno == errno.EWOULDBLOCK:
489 pass
483 finally: 490 finally:
484 os.chdir(cwd) 491 os.chdir(cwd)
485 492