Linux signal (signal kill alarm raise abort settimer sigaction SIGCHLD recycles child process)

1. Basic concepts of signals: 1. Signal mechanism When process A sends a signal to process B, once process B receives the signal, it will stop the executing process and process the signal. After processing the signal, it will continue to return to execute the previous process. It can be seen that the priority of […]

[Signal] Signal processing {Timing of signal processing; kernel mode and user mode; principle of signal capture; signal processing function: signal, sigaction; reentrant function; volatile keyword; SIGCHLD signal}

1. Timing of signal processing 1.1 When does the operating system perform signal processing? First of all, we need to make it clear that the data structures for managing signals are all in the process PCB, and the process PCB belongs to the kernel data. Therefore, signal detection and processing must be performed in the […]

Linux – SIGCHLD Signal – Signal No. 17

Directory What is a zombie process? Purpose of Zombie Process? How to prevent the child process from becoming a zombie process? Tips: When it comes to the SIGCHLD signal, we have to talk about a process knowledge point about the zombie state. What is a zombie process? First, the kernel will release all memory areas […]

6.13 Signal mechanism (signal concept, sending, timer, signal capture, SIGCHLD)

Directory signaling mechanism signal generation Common Signal 1 Common Signal 2 Signal related commands kill/killall Signal sending – kill/raise Signal related functions – alarm/pause Signal function alarm/pause – example Set the signal response mode -signal Signal function signal-example child process end signal notes Signal mechanism The signal is a simulation of the interrupt mechanism at […]

[Linux] volatile | SIGCHLD | multithreading concept

Article directory 1. volatile compiler optimization 2. SIGCHLD signal Verify the existence of SIGCHLD 3. Multithreading multithreading concept understand concepts what is multithreading Low scheduling cost principle of locality what is a process 1. volatile In vscode, create a signal.c file Deliberately do not write a code block in while, so that the compiler thinks […]

On the signal mechanism (signal concept, sending, timer, signal capture, SIGCHLD)

Signal mechanism The signal is a simulation of the interrupt mechanism at the software level, and it is an asynchronous communication method The linux kernel notifies the user process through signals, and different signal types represent different events Linux extends the early unix signal mechanism Processes respond differently to signals default mode ignore signal capture […]