gtpc2m6oC/C++ Language Support User's Guide

sigdelset-Delete a Signal from a Signal Set

This macro deletes a specific signal from a signal set. It is one of several macros that manage or query signal sets.

Format

#include <signal.h>
int sigdelset(sigset_t  *set,
                   int   signo);

set
A pointer to a signal set of the sigset_t type.

signo
One of the signals defined in the signal.h header file that corresponds to a specific signal to be deleted. See Table 13 for a list of supported signals.

Normal Return

On successful completion, the sigdelset macro returns a value of 0.

Error Return

If an error occurs, the sigdelset macro returns a value of -1 and sets errno to the following:

EINVAL
The value specified by the signo parameter is not a valid signal number.

Programming Considerations

Before using the sigdelset macro to delete a signal from a signal set, the signal set must be initialized by using either the sigemptyset macro or 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 sigdelset macro.

Related Information