From c5cbdacb8acec54e140c879393c8c7dd658c3488 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Wed, 13 Nov 2019 13:30:46 -0300 Subject: Implement wait in terms of waitpid The POSIX implementation is used as default and both BSD and Linux version are removed. It simplifies the implementation for architectures that do not provide either __NR_waitpid or __NR_wait4. Checked on x86_64-linux-gnu and powerpc64le-linux-gnu. --- posix/wait.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'posix') diff --git a/posix/wait.c b/posix/wait.c index 0acd1e4926..57064726f0 100644 --- a/posix/wait.c +++ b/posix/wait.c @@ -16,16 +16,12 @@ . */ #include -#include /* Wait for a child to die. When one does, put its status in *STAT_LOC and return its process ID. For errors, return (pid_t) -1. */ __pid_t __wait (int *stat_loc) { - __set_errno (ENOSYS); - return -1; + return __waitpid (WAIT_ANY, stat_loc, 0); } -stub_warning (wait) - weak_alias (__wait, wait) -- cgit v1.2.3-65-gdbad