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
Hi!

> > >Init should get to know that user pressed power button (so it can do
> > >shutdown and poweroff). Plus, it is nice to let user know that we can
> >
> > Not so hasty ;)
> >
> > >+ printk ("acpi: Power button pressed!\n");
> > >+ kill_proc (1, SIGTERM, 1);
>
> [reasons deleted]
>
> Is using a signal the appropriate thing to do anyway?
>
> Wouldn't there be better solutions?
>
> Perhaps a mechanism a user space program can use to communicate to the kernel
> (ala arpd/kerneld message queues, or something like klogd). Then a more
> general user space tool could be used that would do policy appropriate
> stuff, ending with init 0.

init _is_ the tool which is right for defining policy on such issues.

Take a look how UPS managment is handled.

--
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:17    [W:0.067 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site