In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces you about the zombie process and orphan process in Linux, which are shared for your reference and study. Let's take a look at the detailed introduction:
1. Zombie process
A child process that exits without a call to wait () or waitpid () from its parent is a zombie process. If its parent process still exists and does not call wait, the zombie process will not be recycled and will be recycled by init after its parent process exits.
Running result
2. Orphan process
If a parent process exits and one or more of its child processes are still running, those child processes will be orphaned. The orphan process will be adopted by the init process (process number 1), and the init process will collect the status of them.
Running result
However, the child process is always called and cannot be dropped by ctrl ^ C. no, no, no.
3. Register the function atexit, which is called when the process exits.
Running result
As can be seen from the results, when we call fun1, fun2, and fun3 with registration functions, it prints the contents of these functions backwards when the whole process exits, and calls the first registration function and prints the information on the final exit.
Summary
The above is the whole content of this article, I hope that the content of this article can bring some help to your study or work, if you have any questions, you can leave a message and exchange, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.