From: Jens Axboe Date: Tue, 26 Feb 2013 15:11:49 +0000 (+0100) Subject: powerpc: harden the clock ATB probe a bit X-Git-Tag: fio-2.0.15~50^2 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=62443342646df1c4984475f4bf1e09ae1e2a97c6;ds=sidebyside powerpc: harden the clock ATB probe a bit Signed-off-by: Jens Axboe --- diff --git a/arch/arch-ppc.h b/arch/arch-ppc.h index 75176275..0cc0cbda 100644 --- a/arch/arch-ppc.h +++ b/arch/arch-ppc.h @@ -96,11 +96,11 @@ static void atb_clocktest(void) pid = fork(); if (!pid) atb_child(); - else { + else if (pid != -1) { int status; - wait(&status); - if (!WIFEXITED(status)) + pid = wait(&status); + if (pid == -1 || !WIFEXITED(status)) arch_flags &= ~ARCH_FLAG_1; else arch_flags |= ARCH_FLAG_1;