[gnome-continuous-yocto/gnomeostree-3.28-rocko: 6795/8267] bitbake: bb/server/process: Handle EINTR on idle_commands select
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 6795/8267] bitbake: bb/server/process: Handle EINTR on idle_commands select
- Date: Sun, 17 Dec 2017 05:20:46 +0000 (UTC)
commit 5a5c6c7fb6a965e37381ca6ccfd57c92d19769d9
Author: Aníbal Limón <anibal limon linux intel com>
Date: Mon Jul 17 16:45:12 2017 -0500
bitbake: 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
(Bitbake rev: 96bb174325493764718c61c12c943c37b882cd61)
Signed-off-by: Aníbal Limón <anibal limon linux intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
bitbake/lib/bb/server/process.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index f8d6767..a8ba468 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/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):
"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]