Core principles for signal capture

Signal capture feature

  1. Process during normal operation, there is a default PCB signal shielding the word, it assumed ☆, which determines which processes signals automatically shield. When registering a certain signal capture function to capture the signal later, to call the function. And this function is possible to perform a long time, during which signals are not shielded ☆ specified. But specified with sa_mask. End call the signal processing function, and then return to the ☆.
  2. During signal acquisition function execution XXX, XXX signal is automatically shielded.
  3. Conventional signal blocking does not support queue, resulting in multiple records only once. (After 32 support real-time signal queue)

Exercise 1: Set to capture a signal function [sigaction1.c] Exercise 2: Verification during the execution of the signal handler, the signal is delivered several times, then only at the end of the line processing functions, processing time. [Sigaction2.c] Exercise 3: Verify shielding effect sa_mask capture function during execution. [Sigaction3.c]

Kernel for signal capture process:

 

Guess you like

Origin www.cnblogs.com/wanghao-boke/p/11334004.html