diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2017-07-17 16:45:12 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-18 22:32:02 +0100 |
commit | 5a5c6c7fb6a965e37381ca6ccfd57c92d19769d9 (patch) | |
tree | 3d939909a6d383bf4c90c1fc4c25596252782352 | |
parent | a4f2bf37b7eac888f37f11cd4d4606436909c507 (diff) | |
download | poky-5a5c6c7fb6a965e37381ca6ccfd57c92d19769d9.tar.gz |
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>
-rw-r--r-- | 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 f8d6767855..a8ba4681c6 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py | |||
@@ -186,7 +186,12 @@ class ProcessServer(Process, BaseImplServer): | |||
186 | nextsleep = self.next_heartbeat - now | 186 | nextsleep = self.next_heartbeat - now |
187 | 187 | ||
188 | if nextsleep is not None: | 188 | if nextsleep is not None: |
189 | select.select(fds,[],[],nextsleep) | 189 | try: |
190 | select.select(fds,[],[],nextsleep) | ||
191 | except InterruptedError: | ||
192 | # ignore EINTR error, nextsleep only used for wait | ||
193 | # certain time | ||
194 | pass | ||
190 | 195 | ||
191 | def runCommand(self, command): | 196 | def runCommand(self, command): |
192 | """ | 197 | """ |