Skip to content

Commit 4c2ef95

Browse files
committed
tools/nolibc: drop wait4() support
Not all architectures implement the wait4() syscall. It can be implemented in terms of the waitid() syscall, but that would require some rework of the other wait-related functions in wait.h. As wait4() is non-standard and deprecated, remove it. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250821-nolibc-enosys-v1-7-4b63f2caaa89@weissschuh.net
1 parent 61a3cf7 commit 4c2ef95

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

  • tools/include/nolibc/sys

tools/include/nolibc/sys/wait.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,10 @@
1616

1717
/*
1818
* pid_t wait(int *status);
19-
* pid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage);
2019
* pid_t waitpid(pid_t pid, int *status, int options);
2120
* int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options);
2221
*/
2322

24-
static __attribute__((unused))
25-
pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage)
26-
{
27-
#ifdef __NR_wait4
28-
return my_syscall4(__NR_wait4, pid, status, options, rusage);
29-
#else
30-
return __nolibc_enosys(__func__, pid, status, options, rusage);
31-
#endif
32-
}
33-
34-
static __attribute__((unused))
35-
pid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage)
36-
{
37-
return __sysret(sys_wait4(pid, status, options, rusage));
38-
}
39-
4023
static __attribute__((unused))
4124
int sys_waitid(int which, pid_t pid, siginfo_t *infop, int options, struct rusage *rusage)
4225
{

0 commit comments

Comments
 (0)