linux-user: Fix waitid return of siginfo_t and rusage
commitf0907ff4cae743f1a4ef3d0a55a047029eed06ff
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 5 Apr 2024 21:58:14 +0000 (5 11:58 -1000)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 9 Apr 2024 17:43:11 +0000 (9 07:43 -1000)
tree8876cd3e218a86270fde4a9b831e1a64d5ea6a22
parente25fe886b89a396bae5847520b70c148587d490a
linux-user: Fix waitid return of siginfo_t and rusage

The copy back to siginfo_t should be conditional only on arg3,
not the specific values that might have been written.
The copy back to rusage was missing entirely.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2262
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Alex Fan <alex.fan.q@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
linux-user/syscall.c