The related operation function of process signal set in C language _c language

Source: Internet
Author: User

C language Sigismember () function: test whether a signal has been added to the signal
header files: #include <signal.h>

Definition function: int sigismember (const sigset_t *set, int signum);

Function Description: Sigismember () is used to test whether the signal represented by the parameter Signum has been added to the parameter set signal set. Returns 1 if the signal is already in the signal set, or 0.

Return value: The signal set already has this signal to return 1, no to return 0. If there is an error, return-1.

Error code:
1, efault parameter set pointer address cannot be accessed.
2, the einval parameter Signum not the legal signal number.

C language Sigfillset () function: Add all signals to the signal set
header files: #include <signal.h>

Definition function: int sigfillset (sigset_t * set);

Function Description: Sigfillset () is used to initialize the set of parameter sets, and then all the signals are added to this signal set.

Return value: Returns 0 if the execution succeeds, or 1 if there is an error.

Additional Note: The Efault parameter set pointer address cannot be accessed.

C language Sigemptyset () function: Initializing a signal set
header files: #include <signal.h>

Definition function: int sigemptyset (sigset_t *set);

Function Description: Sigemptyset () is used to initialize the parameter set signal set and empty it.

Return value: Returns 0 if the execution succeeds, or 1 if there is an error.

Error code: Efault parameter Set pointer address cannot be accessed.

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: info-contact@alibabacloud.com 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.