I have some zombie processes on my system. I've killed the parent of those zombies hoping init will take over and free up the resources (lots of sockets in CLOSE_WAIT). However init is not removing those proceses from the system:
#ps ax
...
17051 ? Zl 8498:24 [impalad] <defunct>
...
# ps -o ppid= -p 17051
1
Is there a way to remove the zombies without rebooting?
UPDATE:
I've tried kill -s SIGCHLD 1
. It didn't help.
You cannot kill a defunct process. In someone else's words:
http://www.linuxquestions.org/questions/suse-opensuse-60/howto-kill-defunct-processes-574612/
Because your process's parent pid is init (1), you can't do anything except reboot.
https://unix.stackexchange.com/questions/11172/how-can-i-kill-a-defunct-process-whose-parent-is-init
I can't test this, but this guy says you can get rid of a defunct process like so:
What is a zombie process and how do I kill it?
This guy had a problem with a defunct process that seemed to continue running. I don't understand, but here's the link. In this case
kill -9 pid
is claimed to work.Zombie processes still alive and working fine, but can't be killed?