The sigpending function returns a signal set, where each signal isBlocked but not deliveredTherefore, it must beCurrently pending. This signal set is returned through the set parameter. (These signals areGeneratedSignal, but it is blocked because the blocking bit is set in the signal shielding word and cannot be delivered to the process. Note the difference between the signal set returned by sigpending and the signal shield. From the set point of view, this signal set is the subset of the current signal shielding word .)
# Include <signal. h> sigpending (sigset_t *-
Program list 10-11 Signal Setting and sigprocmask instance
# Include sig_quit (signal (SIGQUIT, sig_quit) ==&( sigprocmask (SIG_BLOCK, & newmask, & oldmask) <); (sigpending (& pendmask) <(sigismember (& (sigprocmask (SIG_SETMASK, & oldmask, NULL) <); (signal (SIGQUIT, SIG_DFL) =
This blog is excerpted from advanced programming for UNIX environments (version 2) and used only for personal learning records. For more information about this book, see:Http://www.apuebook.com/.