lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 6 Jul 2007 08:35:46 +0200
From:	"Jesper Juhl" <jesper.juhl@...il.com>
To:	"Kaleem Khan" <linuxuser8@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: kill -9?

On 06/07/07, Kaleem Khan <linuxuser8@...il.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@...il.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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ