]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: bb/server/process: Handle EINTR on idle_commands select
authorAníbal Limón <anibal.limon@linux.intel.com>
Mon, 17 Jul 2017 21:45:12 +0000 (16:45 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 18 Jul 2017 21:32:02 +0000 (22:32 +0100)
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

index f8d676785584de693d807df407ba0b34998b4742..a8ba4681c646af67cb94b5171d68dde2bed017f8 100644 (file)
@@ -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):
         """