We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.
Software

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

What is a Zombie Process?

By Jeremy Laukkonen
Updated: May 16, 2024
Views: 6,499
Share

A zombie process is an instance of a computer program that retains a process table record despite having finished executing. Defunct processes like these are typically associated with Unix® and other similar operating systems due to the way they handle child processes. When a child process has finished executing, the parent is typically responsible for removing it from the process table. It is usually not possible to directly remove a zombie process with the kill command, though the parent can often be made to remove it if the operator uses the signal child (SIGCHLD) notification. Failing this, a zombie process may be removed indirectly by killing the parent.

Zombie process is a metaphorical descriptive term that makes reference to the living dead. Defunct processes in Unix® and similar operating systems can be seen as analogous to zombies in that they maintain a process table presence despite no longer performing their intended functions. When a process has finished executing it is sometimes said to have died, while the means by which the operating system recovers its process table allocation may be known as reaping. The parent process of a zombie is technically supposed to reap its children, though this does not always happen.

There are certain cases where the existence of a zombie process may be intentional or even desired. After a child process has ceased execution, the parent may need to run another instance of the same program later. If a zombie has not been removed from the process table, a new child will not be assigned the same identification (ID) as the old child. Certain programs may benefit from or even require this sort of differentiation.

If a parent process has not executed the wait command to reap zombies it is responsible for, it may be possible to force the issue. This is typically done via the kill command and sending the SIGCHLD signal to the parent process. If everything is working properly, a parent process that receives this signal should reap its zombie children so that their IDs and process table positions can be reused.

Under certain circumstances, a parent process may ignore the SIGCHLD signal. If this occurs and the operator still desires that the process table be cleared, the parent process may be killed. Any zombies that the parent process created will then be be assigned as children to the init process. Since init periodically initiates the wait command on its children, any zombies it is responsible for will eventually be removed from the process table.

Share
EasyTechJunkie is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.
Discussion Comments
Share
https://www.easytechjunkie.com/what-is-a-zombie-process.htm
Copy this link
EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.

EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.