[BRLTTY] How does a BrlAPI client detect that brltty has quit?

Willie Walker William.Walker at Sun.COM
Wed Jul 8 17:18:29 EDT 2009


Hi All:

I'm chasing down a problem where the Python process for Orca goes 
ballistic when someone kills brltty.  The net result is that the desktop 
hangs, which is bad news.

Orca does a gobject.io_add_watch on the brlAPI.fileDescriptor and then 
calls brlAPI.readKey in the callback that is notified when there is 
activity.

Using the trace facility of Python, I'm not sure I'm seeing any loops 
happening and I'm also not getting any exceptions from BrlAPI calls from 
what I can tell.  I'm also not seeing any abnormal condition value being 
sent to the io callback.  I've tried doing an os.fstat on the BrlAPI 
file descriptor before doing the BrlAPI readKey call, and it seems fine, 
too.

Attached is a simple application that doesn't exhibit the same hang as 
Orca, but it does seg fault.  What I do is run brltty in a terminal 
window, and then this app in another.  I then kill brltty and observe 
what happens to this app.  Ideally, the application should be able to 
detect that brltty has disappeared.

Any ideas on what I should be able to do in Python to detect that brltty 
has been killed?

Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.py
Type: text/x-python
Size: 1304 bytes
Desc: not available
Url : http://mielke.cc/pipermail/brltty/attachments/20090708/cf9a43d6/attachment.py 


More information about the BRLTTY mailing list