summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/runqueue.py
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-01-21 15:58:56 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-01-21 15:58:56 +0000
commitd7c9b7d8b90f58705843f8bedcf8eb2d26da1bdd (patch)
tree14474a8ebf3f31cdb7ca673a648efe6b0081bb04 /bitbake/lib/bb/runqueue.py
parent867b01c3ca37b37a578183f671d4fd2fbbed4fd4 (diff)
downloadpoky-d7c9b7d8b90f58705843f8bedcf8eb2d26da1bdd.tar.gz
runqueue: When a task fails, make sure the server still processes events from other workers
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/runqueue.py')
-rw-r--r--bitbake/lib/bb/runqueue.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index b058501376..7a34ba9f7e 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -954,6 +954,12 @@ class RunQueue:
954 # No stdin 954 # No stdin
955 newsi = os.open('/dev/null', os.O_RDWR) 955 newsi = os.open('/dev/null', os.O_RDWR)
956 os.dup2(newsi, sys.stdin.fileno()) 956 os.dup2(newsi, sys.stdin.fileno())
957 # Stdout to a logfile
958 #logout = data.expand("${TMPDIR}/log/stdout.%s" % os.getpid(), self.cfgData, True)
959 #mkdirhier(os.path.dirname(logout))
960 #newso = open(logout, 'w')
961 #os.dup2(newso.fileno(), sys.stdout.fileno())
962 #os.dup2(newso.fileno(), sys.stderr.fileno())
957 963
958 bb.event.fire(runQueueTaskStarted(task, self.stats, self), self.cfgData) 964 bb.event.fire(runQueueTaskStarted(task, self.stats, self), self.cfgData)
959 bb.msg.note(1, bb.msg.domain.RunQueue, 965 bb.msg.note(1, bb.msg.domain.RunQueue,
@@ -1026,6 +1032,10 @@ class RunQueue:
1026 1032
1027 def finish_runqueue(self, now = False): 1033 def finish_runqueue(self, now = False):
1028 self.state = runQueueCleanUp 1034 self.state = runQueueCleanUp
1035
1036 for pipe in self.build_pipes:
1037 self.build_pipes[pipe].read()
1038
1029 if now: 1039 if now:
1030 self.finish_runqueue_now() 1040 self.finish_runqueue_now()
1031 try: 1041 try:
@@ -1034,7 +1044,7 @@ class RunQueue:
1034 bb.msg.note(1, bb.msg.domain.RunQueue, "Waiting for %s active tasks to finish" % self.stats.active) 1044 bb.msg.note(1, bb.msg.domain.RunQueue, "Waiting for %s active tasks to finish" % self.stats.active)
1035 tasknum = 1 1045 tasknum = 1
1036 for k, v in self.build_pids.iteritems(): 1046 for k, v in self.build_pids.iteritems():
1037 bb.msg.note(1, bb.msg.domain.RunQueue, "%s: %s (%s)" % (tasknum, self.get_user_idstring(v), k)) 1047 bb.msg.note(1, bb.msg.domain.RunQueue, "%s: %s (pid %s)" % (tasknum, self.get_user_idstring(v), k))
1038 tasknum = tasknum + 1 1048 tasknum = tasknum + 1
1039 result = os.waitpid(-1, os.WNOHANG) 1049 result = os.waitpid(-1, os.WNOHANG)
1040 if result[0] is 0 and result[1] is 0: 1050 if result[0] is 0 and result[1] is 0: