Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Recently I have noticed that each time I boot up my CentOS 5 box, two processes in the Gnome System Monitor are listed as Zombie. These are netstat and Xsession. No matter how I try to kill them (by trying to stop, kill, or end them), they stay in the list.
Is there a shore shot way to get rid of these two always-zombie processes?
Short answer is you cannot kill zombies, they are already dead!!
The above link will start you in the right direction however. I found it by Googling 'linux zombie processes'.
I've read the article you suggested. Things are somewhat obscure and need some research on my part. The article suggests that it's okay to live with Zombies as they don't take up much of the system resources. However, I feel kinda uncomfortable living with 'em .
An article on Zombie Processes at LinuxSA summarizes very well what's described at Wikipedia.
There are actually four ways to deal with Zombie processes:
Fix the parent; make it wait() for the Zombie process. this can be done simply by issuing this command:
Code:
kill -s SIGCHLD PPID
However, buggy software will simply ignore this command. In most cases, the software being buggy is the very reason for a Zombie process.
Kill the parent; be cautious with this option and know the repercussions of killing a running process dead.
Make the Zombie process a grand child of another process and then kill that process immediately; this will make the Zombie a child of init (PID 1) which regularly puts Zombies to eternal rest; I don't know of an easy way of doing this. You'll need to write code to make this happen.
Live with the Zombie process; this should not be an issue (try not to think about them ) as they don't have any resources tied up to them but if there are a lot of Zombies, under a heavy load you might potentially run out of PIDs
I hope this post is informational. But again the main issue remains the same, we still have no sure-shot way of getting rid of Zombies. May be if I can collect some more interesting information on this, I'll be posting it back here.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.