BSD syscall#111
svc · unix #111
sigsuspend
Atomically replaces the signal mask and waits until a signal handler returns.
Prototype
int sigsuspend(sigset_t mask);Returns: int
Arguments
| Name | Type | Dir | Description |
|---|---|---|---|
| mask | sigset_t | - |
Version history
| XNU tag | macOS | # |
|---|---|---|
| xnu-1456.1.26 | macOS 10.6 Snow Leopard | 111 |
| xnu-1486.2.11 | — | 111 |
| xnu-1504.15.3 | — | 111 |
| xnu-1504.3.12 | — | 111 |
| xnu-1504.7.4 | — | 111 |
| xnu-1504.9.17 | — | 111 |
| xnu-1504.9.26 | — | 111 |
| xnu-1504.9.37 | — | 111 |
Notes
Used to close the race window where you would otherwise unblock a signal and call pause(). Returns -1 with errno EINTR once a handler has run; the original mask is restored automatically. Pairs naturally with sigaction-installed handlers that set a flag the caller checks after return.
Detection
DTrace syscall::sigsuspend:entry shows the temporary mask pointer. The probe pair with proc:::signal-handle traces the unblock-deliver-return cycle.
Related APIs
sigactionsigprocmasksigpending__sigwaitkill