diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/waitpid.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/waitpid.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/waitpid.c b/sysdeps/unix/sysv/linux/waitpid.c index 2fed421c90..052462d2e2 100644 --- a/sysdeps/unix/sysv/linux/waitpid.c +++ b/sysdeps/unix/sysv/linux/waitpid.c @@ -16,10 +16,12 @@ <http://www.gnu.org/licenses/>. */ #include <errno.h> -#include <sysdep-cancel.h> #include <stdlib.h> #include <sys/wait.h> +#include <sysdep-cancel.h> +#include <not-cancel.h> + __pid_t __waitpid (__pid_t pid, int *stat_loc, int options) { @@ -31,3 +33,14 @@ __waitpid (__pid_t pid, int *stat_loc, int options) } libc_hidden_def (__waitpid) weak_alias (__waitpid, waitpid) + +__pid_t +__waitpid_nocancel (__pid_t pid, int *stat_loc, int options) +{ +#ifdef __NR_waitpid + return INLINE_SYSCALL_CALL (waitpid, pid, stat_loc, options); +#else + return INLINE_SYSCALL_CALL (wait4, pid, stat_loc, options, NULL); +#endif +} +libc_hidden_def (__waitpid_nocancel) |