summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/runqueue.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 7a34ba9f7e..1f9907b9d5 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -26,6 +26,7 @@ from bb import msg, data, event, mkdirhier, utils
26import bb, os, sys 26import bb, os, sys
27import signal 27import signal
28import stat 28import stat
29import fcntl
29 30
30class TaskFailure(Exception): 31class TaskFailure(Exception):
31 """Exception raised when a task in a runqueue fails""" 32 """Exception raised when a task in a runqueue fails"""
@@ -1161,12 +1162,16 @@ class runQueuePipe():
1161 def __init__(self, pipein, pipeout, d): 1162 def __init__(self, pipein, pipeout, d):
1162 self.fd = pipein 1163 self.fd = pipein
1163 os.close(pipeout) 1164 os.close(pipeout)
1165 fcntl.fcntl(self.fd, fcntl.F_SETFL, fcntl.fcntl(self.fd, fcntl.F_GETFL) | os.O_NONBLOCK)
1164 self.queue = "" 1166 self.queue = ""
1165 self.d = d 1167 self.d = d
1166 1168
1167 def read(self): 1169 def read(self):
1168 start = len(self.queue) 1170 start = len(self.queue)
1169 self.queue = self.queue + os.read(self.fd, 1024) 1171 try:
1172 self.queue = self.queue + os.read(self.fd, 1024)
1173 except OSError:
1174 pass
1170 end = len(self.queue) 1175 end = len(self.queue)
1171 index = self.queue.find("</event>") 1176 index = self.queue.find("</event>")
1172 while index != -1: 1177 while index != -1: