Examine and change blocked signals
Synopsis:
#include <signal.h>
int pthread_sigmask( int how,
const sigset_t* set,
sigset_t* oset );
Arguments:
-
how
- How you want to change the signal mask; one of:
-
SIG_BLOCK — make the resulting signal mask the
union of the current signal mask and the signal set set.
-
SIG_UNBLOCK — make the resulting signal mask the
intersection of the current signal mask and the complement of the signal
set set.
-
SIG_SETMASK — make the resulting signal mask the
signal set set.
This argument is valid only if set is non-NULL.
-
set
- A pointer to a sigset_t object that specifies the
signals that you want to affect in the mask.
-
oset
-
NULL, or a pointer to a sigset_t object
where the function can store the thread's old signal mask.
Library:
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
Description:
The pthread_sigmask() function is used to examine and/or
change the calling thread's signal mask. If set is
non-NULL, the thread's signal mask is set to
set. If oset is non-NULL, the
thread's old signal mask is returned in oset.
Note:
In order to set the signal-blocked mask for a process with a different real or effective user ID,
your process must have the
PROCMGR_AID_SIGNAL ability enabled.
For more information, see
procmgr_ability()
.
You can't block the SIGKILL and SIGSTOP signals.
Returns:
-
EOK
- Success.
-
EINVAL
- Invalid how parameter.
-
EPERM
- The calling process doesn't have the required permission; see
procmgr_ability()
.
Classification:
POSIX 1003.1 THR
| Safety: |
|
| Cancellation point |
No |
| Interrupt handler |
No |
| Signal handler |
Yes |
| Thread |
Yes |