Re: Let init know user wants to shutdown

Mike Castle
2001-04-10T23:41:40Z

On Tue, Apr 10, 2001 at 11:20:24PM +0000, Miquel van Smoorenburg wrote:
> In article <20010405000215.A599@bug.ucw.cz>,
> Pavel Machek <pavel@suse.cz> wrote:
> >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.

mrc
--
Mike Castle Life is like a clock: You can work constantly
dalgoda@ix.netcom.com and be right all the time, or not work at all
www.netcom.com/~dalgoda/ and be right at least twice a day. -- mrc
We are all of us living in the shadow of Manhattan. -- Watchmen