The sigpending functions checks if a set of signals are currently pending or not. It is used where we need to check if a specific signal is blocked or not. It is defined as:- int sigpending(sigset_t *set); here set is a pointer to a sigset_t structure where the set of pending signals will be stored. For e.g. :
sigset_t pending;
sigpending(&pending);
if(sigismember(&pending,SIGINT))
{
printf("SIGINT is pending");
}
Here the code checks for SIGINT whether its pending or not, a message is printed if its pending.