summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server/process.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-24 16:32:18 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-26 11:10:33 +0000
commit5bc4f6935bf94b1d4e05e8652b5700f9fca389e5 (patch)
treefee84d8c6fea67df9999c0650378ebe0b3672cc3 /bitbake/lib/bb/server/process.py
parentc263f31e39f0fd8a7bc411d142937fc533d9dc97 (diff)
downloadopenembedded-core-contrib-5bc4f6935bf94b1d4e05e8652b5700f9fca389e5.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: d5b0a9a302ac0eafa4f797ac15ea77db87e82b3c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server/process.py')
-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):
try:
try:
os.chdir(os.path.dirname(sockname))
- sock.connect(os.path.basename(sockname))
+ finished = False
+ while not finished:
+ try:
+ sock.connect(os.path.basename(sockname))
+ finished = True
+ except IOError as e:
+ if e.errno == errno.EWOULDBLOCK:
+ pass
finally:
os.chdir(cwd)