Unlocking device(s) on process exit/crash
Clark, Chris M
Chris.Clark at ca.com
Wed Jun 8 10:47:58 PDT 2005
> -----Original Message-----
> From: Joe Shaw [mailto:joeshaw at novell.com]
> On Sun, 2005-06-05 at 14:10 -0400, Clark, Chris M wrote:
> > 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.
>
> HAL is supposed to release the locks if the D-BUS connection
> from your application is lost. If it's not doing this, it's
> probably a bug. Is your app dying because of a python
> exception (which wouldn't cause the connection to die), or
> some other reason? If you kill -9 it, the lock should
> definitely be released.
>
Thanks for everyone's responses to my mail. The problem occurs for
both Python exceptions and the "kill -9" scenario.
It sounds like I'm suposed to deal with the exceptions (which I
already do with a "finally" block which performs the Unlock). The
example I posted had a simplistic "catch" way of dealing this this
(but it was disabled for demo purposes).
For the "kill -9" scenario it sounds like I've hit a bug, that
none else is seeing (thank you to David Zeuthen for testing a
slightly different combination that indicated there may a problem
with the Ubuntu/0.23 dbus bindings). I'll log a report with Ubuntu
bug tracker and see how things go from them.
Slightly off topic; does anyone have Moby.Hotel (the new album)? It
uses a new copy protection to prevent cdrom drives from playing
it (they are not real cd's they don't adhere to the cdaudio
standard), when I insert it cd hal (0.4.7 under Ubuntu Hoary)
seems to disappear. Has anyone seen this too, I don.t have enough
information (well knowledge) to make a report on it just yet.
Chris
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list