posix_spawn: mark error as volatile
authorkevans <kevans@FreeBSD.org>
Tue, 21 Jan 2020 22:02:53 +0000 (22:02 +0000)
committerkevans <kevans@FreeBSD.org>
Tue, 21 Jan 2020 22:02:53 +0000 (22:02 +0000)
commit79450b794a2e340eaa180f350895e21cdc46206b
tree8c560d4e3f836b4dd05e6bbce1c160c5f0566204
parent377f319c60f3033b874d9f2f5d1abfa4925d87c5
posix_spawn: mark error as volatile

In the case of an error, the RFSPAWN'd thread will write back to psa->error
with the correct exit code. Mark this as volatile as the return value is
being actively dorked up for erroneous exits on !x86.

This fixes the following tests, tested on aarch64 (only under qemu, at the
moment):

- posix_spawn/spawn_test:t_spawn_missing
- posix_spawn/spawn_test:t_spawn_nonexec
- posix_spawn/spawn_test:t_spawn_zero

Reported by: mikael
MFC after: 3 days
lib/libc/gen/posix_spawn.c