* kill -9?
@ 2007-07-06 6:21 Kaleem Khan
2007-07-06 6:35 ` Jesper Juhl
0 siblings, 1 reply; 3+ messages in thread
From: Kaleem Khan @ 2007-07-06 6:21 UTC (permalink / raw)
To: linux-kernel
Hello Kernel experts,
I'd like to know whether there's a way to take some action (say
calling a routine) in
response to 'kill -9' before the process is terminated. I tend to
think it's against 'kill -9'
UNIX/Linux philosophy but still I'd like to confirm.
Thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: kill -9?
2007-07-06 6:21 kill -9? Kaleem Khan
@ 2007-07-06 6:35 ` Jesper Juhl
2007-07-06 17:32 ` Denis Vlasenko
0 siblings, 1 reply; 3+ messages in thread
From: Jesper Juhl @ 2007-07-06 6:35 UTC (permalink / raw)
To: Kaleem Khan; +Cc: linux-kernel
On 06/07/07, Kaleem Khan <linuxuser8@gmail.com> wrote:
> Hello Kernel experts,
>
> I'd like to know whether there's a way to take some action (say
> calling a routine) in
> response to 'kill -9' before the process is terminated. I tend to
> think it's against 'kill -9'
> UNIX/Linux philosophy but still I'd like to confirm.
>
You can't catch/block SIGKILL (9), but you can catch SIGTERM (15 -
what kill sends by default).
A well behaved app should catch SIGTERM and do proper cleanup before
shutdown so that when a user does kill <pid_of_app> it shuts down
cleanly. kill -9 <pid_of_app> shouldn't normally be needed - it is
for emergency termination of the app, which is why you can't catch it.
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: kill -9?
2007-07-06 6:35 ` Jesper Juhl
@ 2007-07-06 17:32 ` Denis Vlasenko
0 siblings, 0 replies; 3+ messages in thread
From: Denis Vlasenko @ 2007-07-06 17:32 UTC (permalink / raw)
To: Jesper Juhl; +Cc: Kaleem Khan, linux-kernel
On Friday 06 July 2007 08:35, Jesper Juhl wrote:
> On 06/07/07, Kaleem Khan <linuxuser8@gmail.com> wrote:
> > Hello Kernel experts,
> >
> > I'd like to know whether there's a way to take some action (say
> > calling a routine) in
> > response to 'kill -9' before the process is terminated. I tend to
> > think it's against 'kill -9'
> > UNIX/Linux philosophy but still I'd like to confirm.
> >
> You can't catch/block SIGKILL (9), but you can catch SIGTERM (15 -
> what kill sends by default).
>
> A well behaved app should catch SIGTERM and do proper cleanup before
> shutdown so that when a user does kill <pid_of_app> it shuts down
> cleanly. kill -9 <pid_of_app> shouldn't normally be needed - it is
> for emergency termination of the app, which is why you can't catch it.
Tell that to Oracle. They believe that they are above any rules
and conventions. TERM does not terminate oracle db.
I tried to explain to Oracle DBAs I met how terribly wrong is it.
Quite frustrating experience.
--
vda
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-07-06 17:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-06 6:21 kill -9? Kaleem Khan
2007-07-06 6:35 ` Jesper Juhl
2007-07-06 17:32 ` Denis Vlasenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.