summaryrefslogtreecommitdiff
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-21 21:29:43 +0100
commitbbcce58e824b2793abf50efa52db158ae16e23e4 (patch)
tree17ee51643892bab4f5f054bc5d1363da9563b688
parent8d4c120ec46d6d7a54947c64d33e18cb60b60505 (diff)
downloadbitbake-contrib-bbcce58e824b2793abf50efa52db158ae16e23e4.zip
bitbake-contrib-bbcce58e824b2793abf50efa52db158ae16e23e4.tar.gz
bitbake-contrib-bbcce58e824b2793abf50efa52db158ae16e23e4.tar.bz2
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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/server/process.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 2ebfdfc..3ab793c 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -312,7 +312,7 @@ class ProcessServer(multiprocessing.Process):
# Ignore EINTR
return []
else:
- return []
+ return select.select(fds,[],[],0)[0]
class ServerCommunicator():