Unlocking device(s) on process exit/crash

David Zeuthen david at fubar.dk
Mon Jun 6 07:49:34 PDT 2005


Hi,

On Sun, 2005-06-05 at 14:10 -0400, Clark, Chris M wrote:
> This is my first foray into dbus/hal so if I've posted this to the
> wrong list,
> let me know.

No, it's the right list.
> 
> I'm trying to create an application that monitors cdrom insertions and
> then
> "do something" (the "something" is an audio cd cataloging program
> http://yacddb.sf.net). I'd like to have sole access to the drives to
> prevent
> audio cd players, etc. interfering. I've gone through the mailing
> lists and
> come up with some code to determine the cdrom capable devices, lock
> them,
> detect media inserted, and finally unlock the devices when I'm done.
> The
> problem I'm facing is that if my application crashes/is-killed the
> locks are
> still left in hal.

I tried your test program on Fedora Core 3 with all updates
(dbus-0.22-10.FC3.2 and hal-0.4.7-1.FC3) and it works fine for me. It
might be that hal needs some patching to work with dbus 0.23, I haven't
looked into that. You should probably file a bug in the Ubuntu bug
tracker.

Thanks,
David


_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list