Re: Let init know user wants to shutdown

Kurt Roeckx (Q@ping.be)
Wed, 11 Apr 2001 01:38:30 +0200


On Tue, Apr 10, 2001 at 11:20:24PM +0000, Miquel van Smoorenburg wrote:
>
> the shutdown scripts
> include "kill -15 -1; sleep 2; kill -9 -1". The "-1" means
> "all processes except me". That means init will get hit with
> SIGTERM occasionally during shutdown, and that might cause
> weird things to happen.

-1 mean everything but init.

If pid equals -1, then sig is sent to every process except
for the first one, from higher numbers in the process
table to lower.

And later:

BUGS
It is impossible to send a signal to task number one, the
init process, for which it has not installed a signal han-
dler. This is done to assure the system is not brought
down accidentally.

Kurt

-
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/