summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2017-07-17 16:45:12 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-18 22:31:55 +0100
commit96bb174325493764718c61c12c943c37b882cd61 (patch)
tree9d13f7df2271ba394f4800eaba567d69132fe39a
parent4a14b44b3e4fad3a3e5e53461aa8ba9929a515b8 (diff)
downloadbitbake-contrib-96bb174325493764718c61c12c943c37b882cd61.tar.gz
bb/server/process: Handle EINTR on idle_commands select
If a signal is sent like SIGWINCH the select could be interrupted so ignore the InterruptError like in XMLRPC server [1]. [1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/bitbake/lib/bb/server/xmlrpc.py#n307 Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/server/process.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index f8d676785..a8ba4681c 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -186,7 +186,12 @@ class ProcessServer(Process, BaseImplServer):
nextsleep = self.next_heartbeat - now
if nextsleep is not None:
- select.select(fds,[],[],nextsleep)
+ try:
+ select.select(fds,[],[],nextsleep)
+ except InterruptedError:
+ # ignore EINTR error, nextsleep only used for wait
+ # certain time
+ pass
def runCommand(self, command):
"""