gtpc2m6n | C/C++ Language Support User's Guide |
This macro adds a specific signal to a signal set. It is one of several macros that manage or query signal sets.
Format
#include <signal.h> int sigaddset(sigset_t *set, int signo);
Normal Return
If successful, the sigaddset macro returns a value of 0.
Error Return
If an error occurs, the sigaddset macro returns a value of -1 and sets errno to the following:
Programming Considerations
Before using the sigaddset macro to add a signal to a signal set, the signal set must be initialized by either the sigemptyset or the sigfillset macro. If it is not initialized, the contents of the signal set are not guaranteed.
Examples
See sigsuspend-Set Signal Mask and Wait for a Signal for an example of the sigaddset macro.
Related Information