Analysis of Signal and Process Control in Linux-general Linux technology-Linux programming and kernel information. The following is a detailed description. As a result of your responsibilities, you have to read the notes for obscure Linux applications. Then, you run the command and edit the settings file. Everything is running normally and life is wonderful. However, you know, good times will not last forever. When you encounter the frightening "send the process a SIGHUP" prompt, good time is over.
What is "SIGHUP" and how do you send it? Is it like a bunch of flowers you send to your lover? Although you are sure this is not a command line command, you should try to type it. Of course, there is no result. Then, check the keyboard. No SIGHUP key. So you read the reference guide for this application again and see the following text:
When a hangup signal is received, the sshd program will re-read the configuration file. Send the SIGHUP signal by executing the commands and options when starting the program, such as/usr/sbin/sshd.
Programmers vs. users
The online reference guide for LINUX programs generally takes care of both the needs of end users and the needs of senior programmers. Therefore, some descriptions are difficult to understand. But don't worry. Now we need to unveil the mysterious veil that covers these confusing contents.
Signal and Process Control
This problem mainly belongs to the scope of signal and process control. For our system administrators and common users, we are mainly concerned with starting, stopping, and restarting services, stopping out-of-control processes and suspended processes, and minimizing system interruption. Because different operating systems and different command shell processes different signals, we will only introduce the Linux operating system and bash shell.
Signals are used to communicate with the daemon and process. Any active task is a process, and the daemon is a background service waiting to respond to certain events or execute tasks according to the schedule. A program must have a signal processing program built in it for capturing and responding to signals. The signal Reference Guide in LINUX explains various signals and their usage. The signal is sent by the "kill" command. The kill-l command displays a list of available signals and their numbers.
All daemon and processes have a process ID (PID), for example, the content displayed after the ps name is used: