[oe-commits] [bitbake] 13/15: process: Handle EWOULDBLOCK in socket connect
git at git.openembedded.org
git at git.openembedded.org
Mon Feb 25 22:28:34 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 f770d6a332812031682dc6bef1a2a84da52a4c32
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Mon Dec 24 16:32:18 2018 +0000
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.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/server/process.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 01a4b30..49a1b7c 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -478,7 +478,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)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list