gtpc2m6tC/C++ Language Support User's Guide

sigpending-Examine Pending Signals

This function allows the calling process to determine which signals have been sent to the calling process and are blocked from delivery.

Format

#include <signal.h>
int sigpending(sigset_t *set);

set
A pointer to a signal set where the set of pending signals is stored by the sigpending function. The signal set is of the sigset_t type.

Normal Return

The sigpending function is always successful and returns a value of zero.

Error Return

None.

Programming Considerations

None.

Examples

The following example queries pending signals.

#include <signal.h>

·
·
·
{ sigset_t pending; /* initialize the new signal mask */ sigpending(&pending;); /* see if there's a SIGUSR1 signal pending */ if (sigismember(&pending;, SIGUSR1)) { /* SIGUSR1 is pending, do something */
·
·
·
}
·
·
·
}

Related Information