From: Richard Purdie Date: Fri, 14 Dec 2018 17:49:16 +0000 (+0000) Subject: bitbake: server/process: Ensure socket has a timeout set X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=32395abc6dc7b2f21a059b4a8677361caa95604b;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: 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. (Bitbake rev: f02114cb70e8f6f1d32e19c02b758fe0aadecd19) Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index 1a6a826746c..f7d07266cfb 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py @@ -474,6 +474,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))