summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-14 17:49:16 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-28 17:03:14 +0000
commitb2660f423e3da797084c86f9683831ce7f02c86a (patch)
treed12067d9a3f5f712e113876a74b1e23f01d6d0f8 /bitbake
parentd52655e517072697231681846c7fbe7368dac554 (diff)
downloadpoky-b2660f423e3da797084c86f9683831ce7f02c86a.tar.gz
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: 833d95f538c007c27c6eb8d8f2f97094dc2b1a41) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/server/process.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index 1a6a826746..f7d07266cf 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -474,6 +474,8 @@ def connectProcessServer(sockname, featureset):
474 readfd = writefd = readfd1 = writefd1 = readfd2 = writefd2 = None 474 readfd = writefd = readfd1 = writefd1 = readfd2 = writefd2 = None
475 eq = command_chan_recv = command_chan = None 475 eq = command_chan_recv = command_chan = None
476 476
477 sock.settimeout(2)
478
477 try: 479 try:
478 try: 480 try:
479 os.chdir(os.path.dirname(sockname)) 481 os.chdir(os.path.dirname(sockname))