Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
This two-line program hangs:
from Xlib import display
The workaround is to let your program exit without
closing the display.
In this case, I think it is important to explicitly
flush the connection.
Logged In: YES
Fixed in CVS.
The problem was that the flush operation would block in the
send_and_recv function. It would wait indefinitely for the
socket to have some data to read. If the send buffer was
empty (ie. no new requests to generate responses) and the
xserver had nothing to say, then this would block forever.
Two flush() calls or the code above would produce this
Fix was to make it timeout instantly like the "receive
anything you can, then return" mode of operation.