Bug 13471 - lib/Xt/NextEvent.c:_XtWaitForSomething needs better error handling
Summary: lib/Xt/NextEvent.c:_XtWaitForSomething needs better error handling
Status: RESOLVED DUPLICATE of bug 20048
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xt (show other bugs)
Version: 7.1 (2006.05)
Hardware: x86 (IA32) Linux (All)
: low normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-30 12:38 UTC by Clay Harris
Modified: 2011-10-03 09:55 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Clay Harris 2007-11-30 12:38:16 UTC
_XtWaitForSomething calls either select or poll to wait.
On failure, it handles EINTR and EAGAIN fine, but drops to a generic error
handler on any other type of error.  The generic handler calls XtAppWarningMsg
and then continues the loop.

This behavior is acceptable for transient errors, e.g. ENOMEM, but for others,
unless there is a mechanism to correct the error on the fly, the result is
an infinite loop.

You can either assume that the user's XtAppWarningMsg routine will correct the
error in which case you must at least set app->rebuild_fdlist = TRUE before
continuing the loop
OR you assume that the error is permanent and call XtAppErrorMsg instead.
Errors like EINVAL and EFAULT should always be fatal in any case.
Comment 1 Jeremy Huddleston Sequoia 2011-10-03 09:55:05 UTC
Marking as a dupe of #20048 which has more progress/info.

*** This bug has been marked as a duplicate of bug 20048 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.