Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 07-25-2007, 04:51 AM   #1
Registered: Jul 2005
Location: norway
Posts: 198

Rep: Reputation: 33
Process not killed with -KILL (-9) signal


I have some processes (custom processes for customers) that doesnt get killed when i issue the command "kill -9 (PID)". I cant kill the PPID since its the init process. When i issue this command i dont get any information about any errors when trying to kill the process. A restart of the machine would take of this, but its not something i can do right now. Any ideas on how to kill processes that doesnt get killed with the -KILL signal (-9) ? This signal is suppose to kill everything "in its path".
Old 07-25-2007, 09:47 AM   #2
Registered: Dec 2005
Distribution: RedHat, Ubuntu
Posts: 101

Rep: Reputation: 15
child processes

init can't/won't reap the process if it has children. The process [the one you signalled] will go away when the last of it's children exit. Look for other processes with parent-PID matching the process you're trying to kill... kill them too (or decide they should be allowed to finish.)

either way, once you kill-9 it, the process has no resources to speak of.

Old 07-25-2007, 10:23 AM   #3
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
At least two kind of processes (regarding their status) cannot be killed: "defunct" and "in uninterruptible sleep". Defunct processes (also known as zombies) are childs whose parents do not receive notification about their fate: if the child dies and the parent does not take care of it, the only way to kill a zombie (without rebooting) is to quit or kill the parent (as cconstantine said).
A process in uninterruptable sleep is often a process waiting from a signal from a piece of hardware: if the hardware fails to send the signal, the process sleeps forever, unless you can manually restore the problem. For example, it can happen with floppy drivers and ejecting/reinserting the floppy disk could solve the situation.
You can check the status and the parenthood of the processes with the following ps command
ps -eO user -H
as an example, at this very moment I have a zombie generated from firefox and the related output from the above command is
13498 colucix  S ?        00:00:00   /bin/sh /usr/lib/firefox- -UILocale en-US
13520 colucix  S ?        00:00:00     /bin/sh /usr/lib/firefox- /usr/lib/firefox- -UILocale en-US
13525 colucix  S ?        00:01:31       /usr/lib/firefox- -UILocale en-US
13532 colucix  Z ?        00:00:00         [netstat] <defunct>
The third column is the status: Z means zombie, D means uninterruptible sleep. Hope this will help.

Last edited by colucix; 07-25-2007 at 10:25 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ld terminated by signal 9 [killed] rustyz82 Linux - Software 3 09-15-2015 09:14 AM
how a father process know which child process send the signal SIGCHLD icoming Programming 10 07-20-2010 08:26 AM
kill the process invoked from a shell script, when the script is killed kskkumar Linux - Software 8 05-23-2007 12:29 PM
cannot kill process (kill -9 does not work) mazer13a Linux - General 1 05-27-2005 03:32 PM
When I kill parent process, child isn't killed BengeBoy Linux - Software 0 08-19-2004 05:38 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:02 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration