The signal mechanism of Linux is a method of using signals to transmit messages between processes. The full name of signal is soft interrupt signal, or soft interrupt for short. The essence of a signal is a simulation of an interrupt at the software level. It is an asynchronous communication processing mechanism.
Linux signal mechanism
(Recommended learning: linux tutorial)
The signal mechanism is A method of using signals to transmit messages between processes. The full name of signal is soft interrupt signal, or soft interrupt for short. The essence of a signal is a simulation of an interrupt (soft interrupt) at the software level. It is an asynchronous communication processing mechanism. In fact, the process does not know when the signal arrives.
There are 64 signals defined in the header file kill -l
" command to view the specific name of the signal.
As shown:
The signals numbered 1~31 in the above picture are signals supported by early Linux and are unreliable signals (non-real-time) ), the signals numbered 34~63 were later expanded and are called reliable signals (real-time signals).
The difference between unreliable signals and reliable signals is that the former does not support queuing (this means that if the kernel has already registered this signal, it will not register again, and the process will not know this time. signal occurrence), may cause signal loss, and the latter's registration mechanism is to register the signal every time a reliable signal is received, and will not be lost.
The above is the detailed content of What does the signal mechanism of linux mean?. For more information, please follow other related articles on the PHP Chinese website!