On Mon, Feb 07, 2022 at 05:23:15PM -0700, Shuah Khan wrote:
On 2/7/22 8:21 AM, Mark Brown wrote:
set_tpidr2(getpid());
if (get_tpidr2() == getpid()) {
exit(1);
} else {
putstr("# Failed to set TPIDR2 in child\n");
exit(0);
Is this test expected to fail? Is that why it exits with 0 status?
This is so that we can use the exit code as a boolean value in the parent without having to invert it. Given that this is just a fork() of the program itself it didn't seem useful to invert the value purely to pass it back to the parent, it seemed better to consistently use natural true/false rather than 0 on success rather than mixing the two.