[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Force kill a process?



On Tue, Jul 11, 2006 at 08:19:42PM +0200, heba wrote:
> 2006/7/11, helices <helices@helices.org>:
> >
> >    man ps
> >
> >Read this section:
> >
> >    PROCESS STATE CODES
> >
> 
> 
> thanks very much. But I've a question. Is it possible change the D
> state in other state that it is possible to kill the process?
> 
> thanks again

The kernel trumps any user process, including root, so no - if 
the kernel code doesn't want to exit, you can't force it (except
of course by shutting down - because then it doesn't matter if
the termination damages the system).

The 'D' state is just a an indicator telling you that the process is
suspended at some point in the kernel code where the author has
decided it would not be safe to return prematurely. It is not
the 'D' state that is stopping you from killing it - it just tells
you that the kernel won't let you..

In general the 'D' state tells you that the process is suspended
waiting on some I/O operation to complete, and the code doesn't
allow for any way to exit earlier. 

As an example, if you issue a write request to a serial port when
XOFF has been asserted, the system won't let the task exit
until the write is finished. If this is just normal flow control,
that won't take too long, but if it is being used as a screen pause
by someone who has gone home, it could imply an arbitrarily long
delay...

Think of the 'D' state as saying "The operating system will be damaged
if the process is allowed to exit now".

DigbyT
-- 
Digby R. S. Tarvin                                          digbyt(at)digbyt.com
http://www.digbyt.com



Reply to: