[Xcb] [Bug 41443] Fatal error message when we close libX11 window application.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Oct 5 03:10:08 PDT 2011


https://bugs.freedesktop.org/show_bug.cgi?id=41443

--- Comment #4 from Rami Ylimaki <rami.ylimaki at vincit.fi> 2011-10-05 03:10:06 PDT ---
(In reply to comment #3)
> But right now XCB gives message number EAGAIN. I do not think EAGAIN is very
> appropriate error message when connection is already broken. If you think it is
> correct error message, then I have another fix, just change default io error
> hander of linX11, so that it does not generate fatal error for error case
> EAGAIN.

When connection is closed by X server, read/recv returns zero and doesn't set
any error numbers. The EAGAIN that you see must therefore come from an earlier
system call.

> So we have two solutions, let me know which is best one
> 1) PATCH I have given, make errno= EPIPE , because legacy libX11 is also doing
> the same. 
> 
> 2) If you think XCB is giving correct error number, then just change default io
> error hander of linX11, so that it does not generate fatal error for error case
> EAGAIN.

Neither of these solutions is acceptable. You have no way of knowing which
system call has set errno when IO error handler is called. Just set a proper
error code in xcb_connection_t and use that (reuse has_error or add a new
field).

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the Xcb mailing list