sigpending() - get pending signals
#include <signal.h>
int sigpending(sigset_t *set)
The sigpending(2) function returns a mask of the signals pending for delivery to the calling process in the location indicated by set. Signals may be pending because they are currently masked, or transiently before delivery (although the latter case is not normally detectable).
A 0 value indicated that the call succeeded. A -1 return value indicates an error occurred and errno is set to indicated the reason.
The sigpending(2) function detects the following error:
sigaction(2)
sigprocmask(2)