Index of Section 2 Manual Pages

Interix / SUAsigsuspend.2Interix / SUA

sigsuspend(2)                                             sigsuspend(2)

  sigsuspend()

  NAME

    sigsuspend() - wait for a signal

  SYNOPSIS

    #include 

    int sigsuspend(const sigset_t *sigmask)

  DESCRIPTION

    The sigsuspend(2) function replaces the current signal mask with the set
    pointed to by sigmask, and then waits for a signal to arrive; on return it
    returns the previous set of masked signals. The signal mask set is usually
    empty to indicate that all signals are to be unblocked for the duration of
    the call.

    In normal usage, a signal is blocked using sigprocmask(2) to begin a
    critical section, variables modified on the occurrence of the signal are
    examined to determine that there is no work to be done, and the process
    pauses awaiting work by using sigsuspend(2) with the previous mask
    returned by sigprocmask(2).

  RETURN VALUES

    On success, the sigsuspend(2) call returns the previous set of masked
    signals, On failure, it returns -1 and sets errno.

  ERRORS

    If the sigsuspend(2) function terminates by being interrupted, it sets
    errno to this value:

    [EINTR]
        An interrupt signal was received.

  SEE ALSO

    pause(2)

    sigprocmask(2)

    sigaction(2)

  USAGE NOTES

    The sigsuspend function is thread safe.

    The sigsuspend function is async-signal safe.


Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA