Quote:
Originally Posted by mocean
Hello all here in the message boards..
Would anyone know the best procedure for killing "defunct" processes? I tried killing some but they reappear. I'm not sure how to locate their parent process and stop the "defunct" pid's from coming back.
|
A couple of comments and the answer to your qestion:
1. If you want to kill a process first find out the pid. For example I want to kill "mythfrontend" process
tdec@amd:~> ps -C mythfrontend
PID TTY TIME CMD
11063 ? 00:01:05 mythfrontend
tdec@amd:~> kill -9 11063
2. Here a great tip from another user (Thxs Bill Dandreta):
Sometimes
kill -9 <pid>
will not kill a process. Run
ps -xal
the 4rd field is the parent process, kill all of a zombie's parents and the zombie dies!
Example
4 0 18581 31706 17 0 2664 1236 wait S ? 0:00 sh -c /usr/bin/gcc -fomit-frame-pointer -O -mfpmat
4 0 18582 18581 17 0 2064 828 wait S ? 0:00 /usr/i686-pc-linux-gnu/gcc-bin/3.3.6/gcc -fomit-fr
4 0 18583 18582 21 0 6684 3100 - R ? 0:00 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/cc1 -quie
18581,18582,18583 are zombies -
kill -9 18581 18582 18583
has no effect.
kill -9 31706
removes the zombies.
Ciao
-=terry(Denver)=-