summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/signal/sigpause.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/signal/sigpause.c')
-rw-r--r--libc-top-half/musl/src/signal/sigpause.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/signal/sigpause.c b/libc-top-half/musl/src/signal/sigpause.c
new file mode 100644
index 0000000..363d2fe
--- /dev/null
+++ b/libc-top-half/musl/src/signal/sigpause.c
@@ -0,0 +1,9 @@
+#include <signal.h>
+
+int sigpause(int sig)
+{
+ sigset_t mask;
+ sigprocmask(0, 0, &mask);
+ sigdelset(&mask, sig);
+ return sigsuspend(&mask);
+}