Subject: Re: SIGPWR not handled by init?
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Jonathan A. Kollasch <jakllsch@kollasch.net>
List: tech-userlevel
Date: 07/07/2006 02:43:22
--/WwmFnJnmDyWGHa4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jul 06, 2006 at 02:52:53PM -0700, Garrett D'Amore wrote:
> I noticed that init on NetBSD doesn't seem to handle SIGPWR reasonably.=
=20
> This is unfortunate, because init could be used to initiate a "safe"
> shutdown, switching run-states, etc.
>=20
> I know there is powerd that can watch for power button events, but we
> also want to deal with the case like critically low battery power, etc.=
=20
> In some of these cases we'd rather have init shutdown gracefully than
> just do a hard shutdown.
>=20
> Thoughts?  (include me in replies, as I'm not on tech-kern@)


Well, a few weeks back I had thoughts of a uhidups(4) that talked
to powerd.  But, that wouldn't support contact-closure UPSes, and
the HID UPSes have lots of quirks.  This came about because I (at
the time) thought the manually-do-the-final-kernel-shutdown-in-
userland dance before the suicide was a tad crazy.  So (although
this still requires the aforementioned dance), perhaps, there should be
a way for other userland hw-monitoring daemons to talk to powerd?
Just a thought, NUT's upsmon works almost as well as it can already.

	Jonathan Kollasch

--/WwmFnJnmDyWGHa4
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (NetBSD)

iD8DBQFErhCaOjx1ye3hmokRAs8JAJ9TyAFigQ3PuLaAbKEXnUdDBfYK6ACgid7l
ONZqdiMHaneSXacBDzX+MIs=
=TlCX
-----END PGP SIGNATURE-----

--/WwmFnJnmDyWGHa4--