mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
kselftest/arm64: tpidr2: Switch to waitpid() over wait4()
wait4() is deprecated, non-standard and about to be removed from nolibc. Switch to the equivalent waitpid() call. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Mark Brown <broonie@kernel.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Link: https://lore.kernel.org/r/20250821-nolibc-enosys-v1-6-4b63f2caaa89@weissschuh.net
This commit is contained in:
parent
f11e156e0f
commit
61a3cf7934
|
|
@ -182,16 +182,16 @@ static int write_clone_read(void)
|
|||
}
|
||||
|
||||
for (;;) {
|
||||
waiting = wait4(ret, &status, __WCLONE, NULL);
|
||||
waiting = waitpid(ret, &status, __WCLONE);
|
||||
|
||||
if (waiting < 0) {
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
ksft_print_msg("wait4() failed: %d\n", errno);
|
||||
ksft_print_msg("waitpid() failed: %d\n", errno);
|
||||
return 0;
|
||||
}
|
||||
if (waiting != ret) {
|
||||
ksft_print_msg("wait4() returned wrong PID %d\n",
|
||||
ksft_print_msg("waitpid() returned wrong PID %d\n",
|
||||
waiting);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user