[mdlug] Signals (was: Open Office failures)
Ingles, Raymond
Raymond.Ingles at compuware.com
Wed Feb 17 13:57:51 EST 2010
> From: David Lane
> What is the difference between "kill -9" and "kill -15"
On Linux, signal 15 is "SIGTERM", the "Terminate signal". By default,
if the application doesn't do anything, the OS will stop the program,
release its process ID, free its memory, etc. However, applications can
intercept this signal if they choose. Normally, an application that
intercepts this signal will then proceed to 'cleanly' shut down - safely
closing files, etc.
However, if the application is in a bad state, this can go awry, and
the application doesn't shut down.
Signal 9, on the other hand, is the "Kill signal". The OS doesn't give
the application any opportunity to intercept that signal. Instead, the
OS gets busy terminating the application with extreme prejudice. The
application gets no say in the matter, and doesn't get to close open
files cleanly or anything like that.
So, "kill -15" is the equivalent of "Shut down, please." On the other
hand, "kill -9" is the equivalent of "Die sucker! *Bang*!"
Note: sometimes even "kill -9" doesn't work. Generally this is a
symptom of either a bug in the kernel or some kind of hardware issue. If
the application is trying to read or write from a disk, for example, and
there's a hardware error that's hanging part of the kernel.
Sincerely,
Ray Ingles (313)
227-2317
"On two occasions I have been asked, 'Pray, Mr. Babbage, if you put
into
the machine wrong figures, will the right answers come out?' ...I am
not
able rightly to apprehend the kind of confusion of ideas that could
provoke such a question." - Charles Babbage, inventor of the first
computer
The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.
More information about the mdlug
mailing list