[Linux manuál]
Návod, kniha: POSIX Programmer's Manual
int pthread_sigmask(int how, const sigset_t *restrict
set ,
sigset_t *restrict
oset );
int sigprocmask(int how, const sigset_t *restrict
set ,
sigset_t *restrict
oset );
pthread_sigmask, sigprocmask: zkoumat a měnit blokované signály
Originální popis anglicky: pthread_sigmask, sigprocmask - examine and change blocked signalsNávod, kniha: POSIX Programmer's Manual
STRUČNĚ
#include <signal.h>POPIS / INSTRUKCE
The pthread_sigmask() function shall examine or change (or both) the calling thread's signal mask, regardless of the number of threads in the process. The function shall be equivalent to sigprocmask(), without the restriction that the call be made in a single-threaded process. In a single-threaded process, the sigprocmask() function shall examine or change (or both) the signal mask of the calling thread. If the argument set is not a null pointer, it points to a set of signals to be used to change the currently blocked set. The argument how indicates the way in which the set is changed, and the application shall ensure it consists of one of the following values:- SIG_BLOCK
- The resulting set shall be the union of the current set and the signal set pointed to by set.
- SIG_SETMASK
- The resulting set shall be the signal set pointed to by set.
- SIG_UNBLOCK
- The resulting set shall be the intersection of the current
set and the complement of the signal set pointed to by set.
NÁVRATOVÁ HODNOTA
Upon successful completion pthread_sigmask() shall return 0; otherwise, it shall return the corresponding error number. Upon successful completion, sigprocmask() shall return 0; otherwise, -1 shall be returned, errno shall be set to indicate the error, and the process' signal mask shall be unchanged.CHYBY / ERRORY
The pthread_sigmask() and sigprocmask() functions shall fail if:- EINVAL
- The value of the how argument is not equal to one of
the defined values.
PŘÍKLADY POUŽITÍ
None.APPLICATION USAGE
None.RATIONALE
When a process' signal mask is changed in a signal-catching function that is installed by sigaction(), the restoration of the signal mask on return from the signal-catching function overrides that change (see sigaction()). If the signal-catching function was installed with signal(), it is unspecified whether this occurs. See kill() for a discussion of the requirement on delivery of signals.FUTURE DIRECTIONS
None.SOUVISEJÍCÍ
sigaction() , sigaddset() , sigdelset() , sigemptyset() , sigfillset() , sigismember() , sigpending() , sigqueue() , sigsuspend() , the Base Definitions volume of IEEE Std 1003.1-2001, <signal.h>COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .| 2003 | IEEE/The Open Group |