summaryrefslogtreecommitdiff
path: root/posix
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-11-13 13:30:46 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-12-19 16:11:09 -0300
commitc5cbdacb8acec54e140c879393c8c7dd658c3488 (patch)
tree6fc81c727cf21a1952e6571e50847220babba760 /posix
parentb633cdff2cd7259baea4d115cce0a818542f6f98 (diff)
downloadglibc-c5cbdacb8acec54e140c879393c8c7dd658c3488.tar.gz
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.
Diffstat (limited to 'posix')
-rw-r--r--posix/wait.c6
1 files changed, 1 insertions, 5 deletions
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 @@
<https://www.gnu.org/licenses/>. */
#include <sys/wait.h>
-#include <errno.h>
/* 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)