diff options
Diffstat (limited to '')
-rw-r--r-- | libc-top-half/musl/src/signal/sigwait.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/signal/sigwait.c b/libc-top-half/musl/src/signal/sigwait.c new file mode 100644 index 0000000..c8822ee --- /dev/null +++ b/libc-top-half/musl/src/signal/sigwait.c @@ -0,0 +1,10 @@ +#include <signal.h> + +int sigwait(const sigset_t *restrict mask, int *restrict sig) +{ + siginfo_t si; + if (sigtimedwait(mask, &si, 0) < 0) + return -1; + *sig = si.si_signo; + return 0; +} |