The Xming/Cygwin/X uses two select() loops to handle the clipboard integration with MS Windows. These need to be strengthened and corrected as follows... 1) On connection timeout in winProcessXEventsTimeout() try to repair sockets using a call to 'os/connection.c:CheckConnections()'. 2) In winProcessXEventsTimeout() move the declaration of an automatic variable out of the select() loop. 3) In winClipboardProc() lengthen the select() timeout by a factor of 1000 (from 100usec to 100ms) to slow the poll rate to something more sensible. 4) In winClipboardProc() descriptor sets should not be checked (i.e. by calling FD_ISSET) unless the return value from select() is greater than 0. The state of descriptor sets can be indeterminate otherwise. This case is specific to Xming as Cygwin/X doesn't set a select() timeout and so never returns 0.
Created attachment 9929 [details] [review] Patch to fix
Created attachment 10166 [details] [review] Better patch to fix Better if we continue on error WSAEINTR to prevent unnecessary disconnects.
Is this still necessary?
Report no longer applies as many a bodge has been applied to the clipboard since.
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.