Index of Section 2 Manual Pages

Interix / SUApthread_sigmask.2Interix / SUA

pthread_sigmask(2)                                   pthread_sigmask(2)

  sigprocmask()

  NAME

    sigprocmask(), pthread_sigmask()- manipulate current signal mask

  SYNOPSIS

    #include 

    int sigprocmask(int how, const sigset_t *set, sigset_t *oset);
    int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset);

  DESCRIPTION

    The sigprocmask(2) function examines and/or changes the current signal
    mask (those signals that are blocked from delivery) of the calling thread.
    Signals that belong to the current signal mask set are blocked. This
    function can be called only in a single-thread process.

    The pthread_sigmask(2) function is equivalent to sigprocmask(2) except
    that it examines and/or changes the calling thread's signal mask, no
    matter how many threads are in the process.

    The oset argument is set by the call to the previous value of the signal
    mask. If it is set to NULL, it is ignored.

    The set argument points to a signal set that describes the changes to be
    made to the process's signal mask. If set is NULL, the mask isn't changed.

    The how argument describes the change being requested (these values are
    defined in ):

    SIG_BLOCK
        The new mask is the union of the current mask and the specified set.

    SIG_UNBLOCK
        The new mask is the intersection of the current mask and the
        complement of the specified set.

    SIG_SETMASK
        The current mask is replaced by the specified set.

    If set is NULL, how is ignored. You can examine the current signal set by
    using NULL for set and loading the current signal set into oset.

    You cannot block SIGKILL or SIGSTOP.

  RETURN VALUES

    The pthread_sigmask(2) function returns a 0 value to indicate that the
    call succeeded. If an error occurs, pthread_sigmask(2) returns the
    corresponding error number.

    The sigprocmask(2) functions returns a 0 value to indicate that the call
    succeeded. A -1 return value indicates an error occurred and errno is set
    to indicated the reason.

  ERRORS

    The sigprocmask(2) call will fail and the signal mask will be unchanged if
    one of the following occurs:

    [EINVAL]
        how has a value other than those listed here.

    The pthread_sigmask(2) function does not return the [EINTR] error code.

  SEE ALSO

    kill(2)

    pthread_kill(2)

    sigaction(2)

    sigaddset(3)

    sigdelset(3)

    sigemptyset(3)

    sigfillset(3)

    sigismember(3)

    sigsuspend(2)

  USAGE NOTES

    All of these functions are thread safe.

    The sigprocmask function is async-signal safe. The pthread_sigmask
    function is not async-signal safe.


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