[lkml]   [2001]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Let init know user wants to shutdown
 Pavel Machek <> writes:

> Hi!
> > This is not correct, because we want the power button to be
> > configurable. The user should be able to redefine the power
> > button's action, perhaps to only sleep the system. We currently
> > surface button events to acpid, which then can do the right thing,
> > including a shutdown -h now (which I assume notifies init).
> There's no problem with configurability -- you can configure init as
> well. I saw it pretty much analogic to situation with Ctrl-Alt-Del:
> it also sends signal to init. Init then decides what to do. [I
> believe requiring acpid for such easy stuff is not neccessary...]

Using a signal to hit init with is a bit dubious because most signals
are hooked up for something else already. For example, SIGTERM sent to
my init ( would shutdown and
start sulogin, which is probably not what you want when you press the
off button. The FreeBSD init is similar FWIW (goes to single user

Some PM interfaces (e.g. APM) require a descision to be made by
software on such an event (to turn off or to "reject"). IMHO the best
way to do this is to exec a small script from kernelspace to get the
user's preferred policy; this is lighter weight than a daemon, doesn't
require some nasty magic number interface, and can be easily
programmed by any admin knowing sh or perl or whatever.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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