Sigpending function of Signal

Source: Internet
Author: User

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://

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.