hald-addon-acpi cannot survive acpid restart

Richard Hughes hughsient at gmail.com
Mon Sep 12 10:13:39 PDT 2005


On Mon, 2005-09-12 at 06:16 -0400, Ryan Lortie wrote:
> This is a patch to make it so that if acpid is restarted then the hald
> acpi 'addon' will reconnect to it once it comes back rather then exiting
> completely.

Sounds like a plan.

> Basically, if a dropped connection was detected before, the addon would
> exit().  Now I've added another while(1) around the body of the program
> and changed some other things around very slightly.

Hmm. The code seems a bit wild to me...

> This patch has been in Ubuntu for the past few days and nobody is
> screaming about it so I guess it probably works fairly OK.
> 
> Ubuntu bug is here -- http://bugzilla.ubuntu.com/show_bug.cgi?id=14852
> 
> The patch attached to the bug report is difference since I made it for
> Breezy's HAL (which has sort of taken on a life of its own).  The patch
> against CVS HEAD is attached to this email.

What about a similar idea (but with less tabbing :-) attached.... (no
comments or sensible function names yet)

This is completely untested btw, as I've removed acpid.

Does this do the same stuff another (slightly prettier) way?

Richard.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: addon-acpi.c
Type: text/x-csrc
Size: 4953 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20050912/cef86e97/addon-acpi-0001.c


More information about the hal mailing list