lkml.org 
[lkml]   [2001]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Let init know user wants to shutdown

> In article <9b04food@ncc1701.cistron.net>,
> Miquel van Smoorenburg <miquels@cistron-office.nl> wrote:
> >SIGTERM is a bad choise. Right now, init ignores SIGTERM. For
> >good reason; on some (many?) systems, 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.
> >
> >Perhaps SIGUSR1 ?
>
> In the immortal words of Max Headroom, t-t-talking to myself ;)
>
> In fact, the kernel should probably use a real-time signal
> with si_code set to 1 for ctrl-alt-del, 2 for the powerbutton etc.
>
> It should first check if process 1 (init) installed a handler
> for that real-time signal. If not, it should use the old
> signals (SIGINT for ctrl-alt-del, SIGWINCH for kbrequest).

This is ugly as night, but SIGUSR1 looks okay.

--
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.

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

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.139 / U:1.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site