So i did some research on the site but previous posts answered most of my questions about zombie processes but I have one question that didnt seem to get addressed
"how do you find the parent or parent ID of a zombie process so you can kill it?"
I know p -kill doesnt always just work on the zombie process so how would you find the associated parent so you can just kill the parent process and all associated zombie processes?
---------- Post updated at 07:33 PM ---------- Previous update was at 05:52 PM ----------
Nevermind, I found the answer
Heres how you would find the parent associated with the zombie
1.Do ps-aux first and look for the letter "z" in the stat column
Obtain the PID of the zombie
Do this command to find the parent ID that relates to the zombie and then kill it:
# ps aux -eo ppid| grep <Zombie Process ID>
# kill -9 <PPID>
This argument seems to be flawed. A Zombie process is already dead. Most versions of unix will clean them up automatically. A "kill" command will have no effect on a Zombie process. If the Zombie process is hung up on I/O it may take a reboot to get rid of that process in which case you may see the error message "some processes refuse to die".
Zombies are already dead but they will not go away until the parent issues a wait call for them. Killing the parent works because init will inherit the zombie and issue that wait call. A process that is hung up on I/O is not a zombie.
This piece of code is crude and dangerous (and it doesn't work):
Use the "ps -p" switch to look up the parent process ID.
ps -p<PID> -oppid
Then look carefully at the process before considering killing the process using the correct kill signal for that process (which is unlikely to be "-9"). Also do not kill init (PID 1).
One way to cause Zombie processes and other horrors is indiscriminate use of "kill -9".
No such thing. A Zombie has completed execution of the exit system call. Zombies are not hung on I/O. A process can be hung on I/O and it may indeed require a reboot to fix. But that process was no Zombie.