musl/src/signal/sigwait.c
Rich Felker a7dbcf5c8c use 0 instead of NULL for null pointer constants
and thereby remove otherwise-unnecessary inclusion of stddef.h
2013-12-13 02:20:07 -05:00

11 lines
184 B
C

#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;
}