Re: [PATCH] kill(-1,sig)

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Tue Dec 18 2001 - 12:27:46 EST


> On Fri, Dec 14, 2001 at 05:34:48PM +0000, Andries.Brouwer@cwi.nl wrote:
>
> > + * POSIX (2001) specifies "If pid is -1, sig shall be sent to all processes
> > + * (excluding an unspecified set of system processes) for which the process
> > + * has permission to send that signal."
> > + * So, probably the process should also signal itself.
> > - if (p->pid > 1 && p != current) {
> > + if (p->pid > 1) {
>
> Argh, I hate this. I fail to see what progress a process could make if
> it kills everything _and_ itself. I frequently use "kill -9 -1" to kill
> everything except my shell, and now I'll have to kill everything else
> manually, one by one.
>
> If a process wants to commit suicide too, why doesn't it just do that
> after?

This is the best suggestion I've yet seen. kill() is defined at C library
level so glibc can do the self kill at the end if POSIX_ME_HARDER is
in the environment

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Dec 23 2001 - 21:00:17 EST