Linux system knowledge-signal basics

Source: Internet
Author: User

Vamei Source: Http://www.cnblogs.com/vamei Welcome reprint, Please also keep this statement. Thank you!

Reference links

Http://www.cnblogs.com/vamei/archive/2012/10/04/2711818.html

Role

How information is passed to the process.

Usage Scenarios

The kernel plays the role of the process administrator

Kernel needs to notify process information

A process to tell the B process certain information

Mode of production

Kernel generation, telling a process (e.g. except 0 errors)

A process is generated to tell other processes (such as a clean background app on a phone)

Execution process

The additional information for each process has a location dedicated to saving the received signal.

When a process executes a system call, it exits the kernel when the system call is complete and then looks back at the signal.

If there is a signal, the operation of the signal is performed, this step is called signal processing (signal disposition)/execution (deliver) signal

From signal generation to signal transmission, the signal is in a waiting state (pending)

Signal blocking

We can design the program to block some of the signal generated by the process (that is, to have the system temporarily retain the signal to be sent later, to prevent interrupting sensitive operations ) until the process cancels the block (unblock) or ignores the signal.

Common signals

SIGINT interrupt Interrupt, [ctrl]+c or send a signal from the shell

Sigquit quit, [ctrl]+\ or signal from the shell

SIGSTOP stop Pause, [ctrl]+z or signal from the shell

Sigcont notifies the suspended process to continue

SIGALRM timer, the program generates the signal after a certain amount of time

How to signal in the shell: Kill

Man 7 signal See more signals

Signal Processing

Left to study

Linux system knowledge-signal basics

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.