summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-21 21:26:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-22 19:50:25 +0100
commitae874ef55373160e0fc910273915e885f9236ed2 (patch)
tree6564ecf6bb9a16e4354ee1e3ce865d294b8fcd0b /bitbake/lib/bb/server
parent04dc76713b57f28457742dd863caa663591d4866 (diff)
downloadpoky-ae874ef55373160e0fc910273915e885f9236ed2.tar.gz
bitbake: process: Ensure we call select() to know which fds to read
There is an interesting bug in the current code where a sync command is not seen until the current async command completes, by which time the UI may have shut down. The reason is that if there are idle commands, we may not end up sleeping in the select call at all, partiularly under heavy load like parsing. Fix this by calling select with a zero timeout so that we see active fds and know to read from them. This fixes various problems toaster was having with the recent server changes. [YOCTO #11898] (Bitbake rev: bbcce58e824b2793abf50efa52db158ae16e23e4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server')
-rw-r--r--bitbake/lib/bb/server/process.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index 2ebfdfc7e8..3ab793c778 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -312,7 +312,7 @@ class ProcessServer(multiprocessing.Process):
312 # Ignore EINTR 312 # Ignore EINTR
313 return [] 313 return []
314 else: 314 else:
315 return [] 315 return select.select(fds,[],[],0)[0]
316 316
317 317
318class ServerCommunicator(): 318class ServerCommunicator():