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-02-25 22:27:46 +0000
commitd1baf887cd11bc12175856adaad225e0879554bf (patch)
tree98f54795af1ea9d9670328d9d251c3f199b9a3b0 /bitbake
parent83dbc768d3b1d8d2d56a35afc605499d8e032d46 (diff)
downloadpoky-d1baf887cd11bc12175856adaad225e0879554bf.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: f770d6a332812031682dc6bef1a2a84da52a4c32) 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 01a4b3030c..49a1b7c143 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -478,7 +478,14 @@ def connectProcessServer(sockname, featureset):
478 try: 478 try:
479 try: 479 try:
480 os.chdir(os.path.dirname(sockname)) 480 os.chdir(os.path.dirname(sockname))
481 sock.connect(os.path.basename(sockname)) 481 finished = False
482 while not finished:
483 try:
484 sock.connect(os.path.basename(sockname))
485 finished = True
486 except IOError as e:
487 if e.errno == errno.EWOULDBLOCK:
488 pass
482 finally: 489 finally:
483 os.chdir(cwd) 490 os.chdir(cwd)
484 491