diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-11-13 17:57:00 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-11-13 17:57:00 -0300 |
commit | b2e4fd27eaf30d7159cebeba7d1ad675b10d4ca5 (patch) | |
tree | 2da93bd0789ec89be1b8eecaff42555da738e9ab | |
parent | 64f9e324868d270883f1e5a0810b775b1cdd1229 (diff) | |
download | glibc-azanella/wait-refactor.tar.gz |
Implement waitpid in terms of wait4azanella/wait-refactor
Checked on x86_64-linux-gnu.
-rw-r--r-- | include/sys/wait.h | 1 | ||||
-rw-r--r-- | posix/wait4.c | 2 | ||||
-rw-r--r-- | sysdeps/mach/hurd/wait4.c | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/wait4.c | 1 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/waitpid.c | 6 |
5 files changed, 5 insertions, 7 deletions
diff --git a/include/sys/wait.h b/include/sys/wait.h index 5ac9cd6ca6..39a327f6b2 100644 --- a/include/sys/wait.h +++ b/include/sys/wait.h @@ -15,5 +15,6 @@ extern __pid_t __wait3 (int *__stat_loc, extern __pid_t __wait4 (__pid_t __pid, int *__stat_loc, int __options, struct rusage *__usage) attribute_hidden; +libc_hidden_proto (__wait4); #endif #endif diff --git a/posix/wait4.c b/posix/wait4.c index eb4f7fb6de..5857b4e7c1 100644 --- a/posix/wait4.c +++ b/posix/wait4.c @@ -26,5 +26,5 @@ __wait4 (__pid_t pid, int *stat_loc, int options, struct rusage *usage) return (pid_t) -1; } stub_warning (wait4) - +libc_hidden_def (__wait4) weak_alias (__wait4, wait4) diff --git a/sysdeps/mach/hurd/wait4.c b/sysdeps/mach/hurd/wait4.c index 78ad33e8f5..a0137482c4 100644 --- a/sysdeps/mach/hurd/wait4.c +++ b/sysdeps/mach/hurd/wait4.c @@ -49,5 +49,5 @@ __wait4 (pid_t pid, int *stat_loc, int options, struct rusage *usage) return (pid_t) __hurd_fail (err); } } - +libc_hidden_def (__wait4) weak_alias (__wait4, wait4) diff --git a/sysdeps/unix/sysv/linux/wait4.c b/sysdeps/unix/sysv/linux/wait4.c index c722753819..0a0e465be0 100644 --- a/sysdeps/unix/sysv/linux/wait4.c +++ b/sysdeps/unix/sysv/linux/wait4.c @@ -81,4 +81,5 @@ __wait4 (__pid_t pid, int *stat_loc, int options, struct rusage *usage) return infop.si_pid; #endif } +libc_hidden_def (__wait4); weak_alias (__wait4, wait4) diff --git a/sysdeps/unix/sysv/linux/waitpid.c b/sysdeps/unix/sysv/linux/waitpid.c index d35aac01bc..e0905eab53 100644 --- a/sysdeps/unix/sysv/linux/waitpid.c +++ b/sysdeps/unix/sysv/linux/waitpid.c @@ -24,11 +24,7 @@ __pid_t __waitpid (__pid_t pid, int *stat_loc, int options) { -#ifdef __NR_waitpid - return SYSCALL_CANCEL (waitpid, pid, stat_loc, options); -#else - return SYSCALL_CANCEL (wait4, pid, stat_loc, options, NULL); -#endif + return __wait4 (pid, stat_loc, options, NULL); } libc_hidden_def (__waitpid) weak_alias (__waitpid, waitpid) |