summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-09-10 11:14:54 -0700
committerChris Larson <chris_larson@mentor.com>2011-01-04 10:25:07 -0700
commitf5c086fd1a094d9fb9e99783d4190f26c9129157 (patch)
tree8e292aaa4489016ee93c0ea76bf198b51e9b1b22
parent479716be4a0ec12225c7d13e6c6676727e5d2298 (diff)
downloadbitbake-f5c086fd1a094d9fb9e99783d4190f26c9129157.tar.gz
Fix exit code display for task failure
Per the python documentation, os.waitpid returns the exitcode shifted up by 8 bits, and we weren't compensating, resulting in a display of 'failed with 256' when a worker process exits with a code of 1. Signed-off-by: Chris Larson <chris_larson@mentor.com>
-rw-r--r--lib/bb/runqueue.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 1a275405c..50841a45e 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -911,7 +911,7 @@ class RunQueue:
Called when a task has failed
Updates the state engine with the failure
"""
- bb.msg.error(bb.msg.domain.RunQueue, "Task %s (%s) failed with %s" % (task, self.get_user_idstring(task), exitcode))
+ bb.msg.error(bb.msg.domain.RunQueue, "Task %s (%s) failed with exit code %s" % (task, self.get_user_idstring(task), exitcode))
self.stats.taskFailed()
fnid = self.runq_fnid[task]
self.failed_fnids.append(fnid)
@@ -1010,7 +1010,7 @@ class RunQueue:
self.build_pipes[result[0]].close()
del self.build_pipes[result[0]]
if result[1] != 0:
- self.task_fail(task, result[1])
+ self.task_fail(task, result[1]>>8)
return
self.task_complete(task)
self.stats.taskCompleted()
@@ -1066,7 +1066,7 @@ class RunQueue:
self.build_pipes[result[0]].close()
del self.build_pipes[result[0]]
if result[1] != 0:
- self.task_fail(task, result[1])
+ self.task_fail(task, result[1]>>8)
else:
self.stats.taskCompleted()
bb.event.fire(runQueueTaskCompleted(task, self.stats, self), self.cfgData)