MEWBIES@: Facebook Twitter G+ YouTube DeviantArt Forum Wall
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██ ██
█▌ - HOW TO KILL A DEFUNCT PROCESS - █▌
█▌ █▌
█ ▐▌
█ A defunct process, aka Zombie thus the 'Z' in ps list, is generally a ▐▌
█ process that was started by a parent that has exited already, leaving the ▐▌
█ child as a Zombie. Normally this would be a bug in the program the parent ▐▌
█ has run. Therefore you can't kill a defunct/zombie by traditional means; ▐▌
█ kill -9 PID, because it is already dead. You need to kill the parent ▐▌
█ process. ▐▌
█ ▐▌
█ Here's an example: ▐▌
█ ps x ▐▌
█ PID TTY STAT TIME COMMAND ▐▌
█ 22408 ? Sl 0:00 MyProgram ▐▌
█ 22563 ? S 0:00 sshd: mewbies@pts/0 ▐▌
█ 14549 ? Z 0:00 [lftp] <defunct> ▐▌
█ 14556 ? Z 0:00 [lftp] <defunct> ▐▌
█ 22564 pts/0 Ss 0:00 -bash ▐▌
█ 22605 pts/0 R+ 0:00 ps x ▐▌
█ ▐▌
█ So to kill a <defunct> you need to find its 'PPID' number if you don't ▐▌
█ know the parent: ▐▌
█ ps -ef --forest | less ▐▌
█ ▐▌
█ Hit your enter key to scroll this list until you find it, for example: ▐▌
█ UID PID PPID C STIME TTY TIME CMD ▐▌
█ <snip> ▐▌
█ mewbies 6129 1 0 May27 ? 00:06:48 /MyProgram ▐▌
█ mewbies 14549 6129 0 03:50 ? 00:00:00 \_ [lftp] <defunct> ▐▌
█ mewbies 14556 6129 0 03:50 ? 00:00:00 \_ [lftp] <defunct> ▐▌
█ ▐▌
█ To quit this window, press your q key. ▐▌
█ ▐▌
█ In the output example above you can now see /MyProgram is the parent of ▐▌
█ the defunct/zombie child process. To kill it, use its PPID: ▐▌
█ kill -9 6129 ▐▌
█ ▐▌
█ //---------------------------------------------------------------------- ▐▌
█ ▐▌
█ If you find mistakes, have suggestions, and or questions please post at ▐▌
█ mewbies forum HERE - thank you. ▐▌
█ ▐▌
█ Last update on 16 Jun '10 ▐▌
█ ▐▌
█▌ █▌
█▌ - mewbies.com - █▌
█▌ █▌
██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██