Transfer from http://blog.csdn.net/elbort/article/details/7594772Sigprocmask function:Function Description:Sets the processing mode (blocking or non-blocking) of the signal within the signal shielding set.Usage:#include int sigprocmask (int how,
Sigprocmask function:
Function Description:
Sets the mode of processing (blocking or not blocking) the signal within the set of the signal shield.
Usage:
#include
int sigprocmask (int how, const sigset_t *set, sigset_t *oldset);
Note:if
muge0913Link: Linux c sigprocmask blocking process1, sometimes do not want to receive the signal immediately stop the current execution, to deal with the signal, but also do not want to ignore the signal, but delay a period of time to call the
The signal source generates a signal for the target process , which is then determined by the kernel to pass the signal to the target process. The flowchart from the signal generation to the target process is as follows:Processes can block the
This series of articles written by muge0913, reproduced please note the Source: http://blog.csdn.net/muge0913/article/details/7334771
1. Sometimes you do not want to stop the current execution immediately when receiving a signal to process the
In section 10.8 We mention that the mask of the process is a set of signals that the current blocking signal is sent to the process. A process can view its signal mask, change its signal mask, or perform both operations at the same time, by invoking
In section 10.8 We mention that the mask of the process is a set of signals that the current blocking signal is sent to the process. A process can view its signal mask, change its signal mask, or perform both operations at the same time, by invoking
1, sometimes do not want to receive the signal immediately stop the current execution, to deal with the signal, but also do not want to ignore the signal, but delay a period of time to call the signal processing function. This situation is achieved
We already know that we can terminate the process by signal, or through the signal to communicate between processes, the program can also specify the signal's associated processing function to change the signal's default processing mode, you can
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.