On 16 December 2010 11:07, Khem Raj <[email protected]> wrote: > On Wed, Dec 15, 2010 at 4:09 PM, Graham Gower <[email protected]> wrote: >> os.waitpid returns an error code in the high byte of this 16 bit value. >> >> Fixes error messages returning codes such as >> ERROR: Task 3383 >> (/storage/oe/testbuilder/openembedded/recipes/kexec-tools/kexec-tools-klibc_2.0.2.bb, >> do_compile) failed with exit code '256' >> >> Signed-off-by: Graham Gower <[email protected]> >> --- >> lib/bb/runqueue.py | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py >> index f84d9aa..50ea5ea 100644 >> --- a/lib/bb/runqueue.py >> +++ b/lib/bb/runqueue.py >> @@ -938,7 +938,7 @@ class RunQueueExecute: >> 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)&0xf)
As pointed out by obi on IRC, that should be & 0xff. > > > hmmm how about using try except you can also use strerror and errno to > deliver a better diagnostic what went wrong. > > try: > pid, status = os.waitpid(-1, os.WNOHANG) > ..... > break > except OSError, (errno, strerror): > ..... > The extra error checking is probably not a bad thing, but in this case the waitpid system call is sucessful, it is returning the status of the child process which happened to be non zero. _______________________________________________ Bitbake-dev mailing list [email protected] https://lists.berlios.de/mailman/listinfo/bitbake-dev
