Better shutdown message
When the server crashes or you get XKillClient'ed, you can often get a confusing error message like:
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
after 98 requests (40 known processed) with 0 events remaining.
11 is EAGAIN
here, which is not normally a fatal condition on its own. The real problem is we're out of data to read because the socket is closed. Detect this so we can print the more informative message.