Removing children before their parent

David Zeuthen david at fubar.dk
Sat Jul 22 08:11:10 PDT 2006


On Tue, 2006-07-18 at 13:27 +0200, Fabian Steiner wrote:
> Hello!
> 
> Obviously it can happen that HAL removes a parent device before the 
> child does. Is there any possibility to avoid this? For me there is not 
> much sense in it since it makes quite a lot of different things  
> difficult (especially when you are trying to build a device tree).
> 

With device objects from sysfs this should never happen as we're
guaranteed to get the events in order from udev.

> Are there any plans to change this behavior? I have only found a small 
> remark in [1] (revison 1.36) ...

Yes, for example when we build device objects in user space through e.g.
the hal-device program, via <spawn> or through the experimental
Bluetooth stuff that Matthew Garrett posted. I think the answer is to
just remove all childs when a parent goes away but in practice it
haven't been a problem yet.

Cheers,
David




More information about the hal mailing list