[bitbake-devel] [PATCH] server/process: Ensure socket has a timeout set
Richard Purdie
richard.purdie at linuxfoundation.org
Fri Dec 14 18:15:29 UTC 2018
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.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/server/process.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 1a6a826746..f7d07266cf 100644
--- a/lib/bb/server/process.py
+++ b/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))
--
2.19.1
More information about the bitbake-devel
mailing list