The difference between the background process and the daemon process in Linux is:
1. The daemon process has completely separated from the terminal console, while the background program has not completely separated from the terminal ( The results will still be output to the terminal before the terminal is closed);
2. The daemon process will not be affected when closing the terminal console, and the background program will stop when the user exits. You need to restart it with Nohup command &
format can be run to avoid the impact;
3. The session group of the daemon process, the current directory, and the file descriptor are all independent. Running in the background is just a fork of the terminal to allow the program to execute in the background. These have not changed.
Recommended tutorial: linux tutorial
The above is the detailed content of The difference between background process and daemon process in Linux. For more information, please follow other related articles on the PHP Chinese website!