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