From: Chris Larson Date: Fri, 10 Sep 2010 18:14:54 +0000 (-0700) Subject: Fix exit code display for task failure X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=90c2b6c;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 --- diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py index 8c99c33f35d..aa9a5f720a9 100644 --- a/lib/bb/runqueue.py +++ b/lib/bb/runqueue.py @@ -949,7 +949,8 @@ class RunQueue: Called when a task has failed Updates the state engine with the failure """ - logger.error("Task %s (%s) failed with %s", task, self.get_user_idstring(task), exitcode) + logger.error("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) @@ -1023,7 +1024,7 @@ class RunQueue: self.build_pipes[result[0]].close() del self.build_pipes[result[0]] if result[1] != 0: - failure(task, result[1]) + failure(task, result[1]>>8) else: success(task) self.stats.taskCompleted()