Linux process Management signal processing (1)

Source: Internet
Author: User
Tags signal handler linux

Signal is a very important mode of communication in the operating system. In recent versions, there have been few major changes in signal processing. We analyze the signal implementation of the Linux kernel from the user space signal application.

One: signal-related data structure

The structure of the signal in the task_struct:

struct Task_struct {
...
Pointing to the process signal descriptor
struct signal_struct *signal;
The processing descriptor of the signal is
struct sighand_struct *sighand;
The mask of blocking signal
sigset_t blocked, real_blocked;
The saved signal mask. When defining tif_restore_sigmask, restore the signal mask
sigset_t saved_sigmask;   /* To is restored with tif_restore_sigmask/
//storage of hung signal
struct sigpending pending;
Specifies the stack address of the signal handler
unsigned long sas_ss_sp;
The stack size of the signal processing program is
size_t sas_ss_size;
A pointer to a function that the device drives to block some signal
int (*notifier) (void *priv) of the process;
The parameter void *notifier_data of the notifier ()
;
The driver passes the bitmap sigset_t *notifier_mask of the signal blocked by notifier ()
;
...
}   

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.