Linux signal Interpretation (3)--Signal processing mechanism

Source: Internet
Author: User
If a process is needed to capture a signal and handle it accordingly, it is necessary to register the signal processing function (in fact, the kernel needs to identify the signal function, similar to the C language include a function library).

Processing the signal is like a soft interrupt, the kernel prepares a signal vector table for each process and records the processing mechanism of the signal. When a signal occurs, the kernel invokes the registered function to process it.

When the signal comes, it is unknown, so the process cannot wait for the signal to come. The reception of the signal does not have a user process to complete, requires the kernel to proxy. When the user process P2 sends a signal to another process P1, the kernel receives the signal and places the signal in the signal queue of the P1 process. When the P1 process enters the kernel state, the signal queue is checked and the corresponding signal function is transferred for processing.

Linux signal Interpretation (3)--Signal processing mechanism

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.