Problem killing process
I'm having a bit of trouble killing a process. I was using rpm to remove a package when the terminal windo froze. So I opened up a new terminal and tried to kill the rpm process but with no luck.
Anyone any ideas? Thanks Paddy Code:
[root@paddy ~]# ps -A | grep rpm |
See what state the process is in with "ps aux ". If it's stuck in uninterruptable sleep (state D) it can't be killed, even with kill -9. I've seen this happen with corrupt RPM databases.
|
Thanks for the info, I actually ended up rebooting my machine because I wasn't able to kill the process!
Paddy |
It is better to use kill code 15 before using kill code 9 to force the program to quit. Kill code 15 means terminate, so it is the same as hitting CTRL+C. Sending kill code 9 to a program sometimes turns it into a zombie. A zombie process will not take up resources but a reboot is the only way to get rid of it.
Some processes, you will have to terminate or kill its parent PID. |
Thanks I'll remember that for next time. It's annoying when a program like rpm or yum gets zombied like this because it locks some files and the only thing I can do is reboot before I can use that program again.
Paddy |
Quote:
|
Thanks I'm going to try and reproduce it again so that I can test out the different methods of resolving it. After the first kill attempt wasn't successful I killed/closed the terminal window that had frozen, thats when the pts/1 changed to ? I was hoping at the time that killing the parent would also kill the child rpm process. It usually does but maybe this was just a freak occurence!
Paddy |
All times are GMT -5. The time now is 02:29 PM. |