Is x server connection still valid?

hugo vanwoerkom huugske at
Tue Jan 9 14:05:17 PST 2007


I hope this is the right place to ask this question:

I have various displays and want to modify the LEDs of the keyboards
connected to them.

In order to do that I XOpenDisplay and see if it is successful.

If successful I use XChangeKeyboardControl.

But how do I find out next time I use that function that the X server
connection is still valid?
The user may have logged off, causing a SIGPIPE fault in using the function.
Is there some way to find if the display structure actually still is
for an existing connection without getting into that SIGPIPE?



More information about the xorg mailing list