How to kill a zombie process
How to kill a zombie process?
Send the SIGCHLD to the parent process, stop the parent process, or reboot the system
When you have a zombie process that does not respond to kill -9
, then we can try a few more options.
Option 1: sending a signal to the parent process
Use the kill command and send the SIGCHLD signal. This might trigger the required wait() function and return things in a normal state.
kill -SIGCHLD PID-OF-PARENT-PROCESS
Option 2: kill the parent process
If the first option does not work, then try stopping the parent process. Sometimes this might properly close the child process as well.
Option 3: reboot
Both options not working? Then a reboot will, as this will stop everything and start the system with a fresh process table.