summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/waitpid.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/waitpid.c')
-rw-r--r--sysdeps/unix/sysv/linux/waitpid.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/sysdeps/unix/sysv/linux/waitpid.c b/sysdeps/unix/sysv/linux/waitpid.c
index 0d780da528..59d0c9e0bb 100644
--- a/sysdeps/unix/sysv/linux/waitpid.c
+++ b/sysdeps/unix/sysv/linux/waitpid.c
@@ -23,26 +23,11 @@
__pid_t
__waitpid (__pid_t pid, int *stat_loc, int options)
{
- if (SINGLE_THREAD_P)
- {
#ifdef __NR_waitpid
- return INLINE_SYSCALL (waitpid, 3, pid, stat_loc, options);
+ return SYSCALL_CANCEL (waitpid, pid, stat_loc, options);
#else
- return INLINE_SYSCALL (wait4, 4, pid, stat_loc, options, NULL);
+ return SYSCALL_CANCEL (wait4, pid, stat_loc, options, NULL);
#endif
- }
-
- int oldtype = LIBC_CANCEL_ASYNC ();
-
-#ifdef __NR_waitpid
- int result = INLINE_SYSCALL (waitpid, 3, pid, stat_loc, options);
-#else
- int result = INLINE_SYSCALL (wait4, 4, pid, stat_loc, options, NULL);
-#endif
-
- LIBC_CANCEL_RESET (oldtype);
-
- return result;
}
libc_hidden_def (__waitpid)
weak_alias (__waitpid, waitpid)