24. Reliable and unreliable Signals

Source: Internet
Author: User

The following content is reproduced from [1 ].

1. Reliable and unreliable Signals

1) signals smaller than sigrtmin (in Red Hat 7.2, sigrtmin = 32, sigrtmax = 63) are unreliable signals. The main problems are as follows:

①Each time a process processes a signal, it sets the response to the signal as the default action. In some cases, it may lead to incorrect signal processing. Therefore, if you do not want such an operation, you need to call signal () again at the end of the signal processing function (), reinstall the signal.

②The signal may be lost.

Therefore, the unreliable signal in early UNIX mainly refers to the possibility that the process may make a wrong response to the signal and the possible loss of the signal.

2) signal values between sigrtmin and sigrtmax are both reliable signals, which overcome the possibility of signal loss.

Linux supports the new version of the signal installation function sigation () and the signal sending function sigqueue (). It also supports the early signal () signal installation function and the signal sending function kill ().

2. Support queuing for signals after sigrtmin. The biggest difference between signal and sigaction is that signals installed by sigaction can transmit information to the signal processing function (which is true for all signals ), however, signals installed by signal cannot transmit information to signal processing functions. The same is true for the signal sending function.

3. the last 32 signals represent real-time signals, which are equivalent to the reliable signals described above. This ensures that multiple real-time signals are received. Real-time signals are part of the POSIX standard and can be used in application processes. Non-real-time signals do not support queuing and are all unreliable signals. Real-time signals support queuing and are all reliable signals.

Reference

[1]Http://www.ibm.com/developerworks/cn/linux/l-ipc/part2/index1.html

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