[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:55:51 PDT 2011


--- Comment #5 from Arvind Umrao <arvind.umrao at oracle.com> 2011-10-05 03:55:51 PDT ---
(In reply to comment #4)
> (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
> 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.

Yes you are right. EAGAIN is comming from pervious system calls. Thats why
erron values are wrong. Our legacy libX11 hardcoded it with EPIPE.

> > 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
> 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).

I do agree with you but I do not want to make big changes. libX11 is wrapper
over xcb. libX11 default io hander print error message after filtering error
variable erron. I am afraid changing any thing at
libX11:XlibInt.c:_XDefaultIOError() is risky. So I have to set correct value of
erron some where.

If you do not want me to set value of erron at xcb,  can I set it at

Like this way  
  erron=EPIPE; //or ESET(EPIPE)   Even our legacy libX11 is also hardcoing it
in same way


Let me know if I should send you another patch with above changes.

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