Messages in this thread | | | Date | Fri, 13 Apr 2001 00:29:21 +0000 | From | Pavel Machek <> | Subject | Re: 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/
| |