about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/pause.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/pause.c')
-rw-r--r--sysdeps/unix/sysv/linux/pause.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/pause.c b/sysdeps/unix/sysv/linux/pause.c
index 4ccce9ebd8..3300eb8b07 100644
--- a/sysdeps/unix/sysv/linux/pause.c
+++ b/sysdeps/unix/sysv/linux/pause.c
@@ -19,10 +19,10 @@
 #include <signal.h>
 #include <unistd.h>
 #include <sysdep-cancel.h>
+#include <not-cancel.h>
 
 /* Suspend the process until a signal arrives.
    This always returns -1 and sets errno to EINTR.  */
-
 int
 __libc_pause (void)
 {
@@ -33,3 +33,14 @@ __libc_pause (void)
 #endif
 }
 weak_alias (__libc_pause, pause)
+
+int
+__pause_nocancel (void)
+{
+#ifdef __NR_pause
+  return INLINE_SYSCALL_CALL (pause);
+#else
+  return INLINE_SYSCALL_CALL (ppoll, NULL, 0, NULL, NULL);
+#endif
+}
+libc_hidden_def (__pause_nocancel)