.TH sigsuspend() "" "" "System Call (libc)"
.PC "Install a signal mask and suspend process"
.B "#include <signal.h>"
\fBint sigsuspend(\fIset\^\fB)\fR
\fBconst sigset_t *\fIset\^\fB;\fR
.PP
.B sigsuspend()
replaces the process's signal mask with the set of signals to which
.I set
points, then suspends the current process until it receives a signal that
either terminates the process or invokes a signal-handling function.
.PP
If the received signal terminates the process,
.B sigsuspend()
does not return.
If, however, the received signal invokes a signal-handling function,
.B sigsuspend()
restores the original signal mask.
.PP
Because
.B sigsuspend()
indefinitely suspends execution of the process,
there is no return value that indicates successful completion.
If something goes wrong, it returns \-1 and sets
.B errno
to an appropriate value.
.B sigsuspend()
fails if either of the following is true:
.IP \(bu 0.3i
The calling process catches a signal and grabs
control from the signal-catching function.
.B sigsuspend()
sets
.B errno
to
.BR EINTR .
.IP \(bu
.I set
points outside the process's allocated address space.
.B sigsuspend()
sets
.B errno
to
.BR EFAULT .
.SH "See Also"
.Xr "libc," libc
.Xr "siglongjmp()," siglongjm
.Xr "signal()," signal
.Xr "sigsetjmp()" sigsetjmp
.br
\*(PX Standard, \(sc3.3.7
