On Dec 3 11:31, Corinna Vinschen wrote: > On Dec 2 14:56, Jon TURNEY wrote: > > On 02/12/2013 14:17, Corinna Vinschen wrote: > > > On Dec 2 13:11, Jon TURNEY wrote: > > >> What you write does seem to support the theory that this is a regression > > >> in > > >> select() in the cygwin DLL. It might be useful if you could say what > > >> version > > >> of the cygwin DLL you had when it was working correctly before you > > >> upgraded. > > >> > > >> [1] http://cygwin.com/ml/cygwin-xfree/2013-10/msg00031.html > > >> [2] http://cygwin.com/ml/cygwin-xfree/2013-11/msg00012.html > > > > > > Are you sure this is a select problem? If so, can you create an STC, > > > perhaps? > > > > "Only a madman is absolutely sure". I'm afraid the best test case I have a > > the moment is: > > > > Install xorg-server-debuginfo > > Start XWin -noclipboard -multiwindow > > Start xwinclip under gdb, and place a breakpoint at wndproc.c:133, and run > > it > > Start emacs-x11, open the Shakespeare text from [1] in a buffer > > Open notepad > > Copy and paste the text from the emacs buffer into notepad > > The breakpoint is hit. Notice that select() has returned 0, the read ready > > fd_set is empty and the timeout hasn't expired. I claim that the read ready > > fd_set should indicate that the X connection socket is ready. > > Well, that's not exactly an STC... > > So, IIUC, you're saying that, in fact, select doesn't return too early, > rather it returns without setting the return value correctly. You > expect it to return a value > 0, right?
I don't see any bigger changes in select since Cygwin 1.7.19. Only one change since then, and that's only in 1.7.26, not in 1.7.25 as the OP claimed using. The change in 1.7.19 is only 64 bit related, changing an unsigned to a size_t cast and a few debug printfs. Only in 1.7.18 is a little bit bigger change but it should only affect signal handling. Talking about wndproc.c, it only checks iReturn for being < 0. After that, we don't really know which value it has, we only know that FD_ISSET(iConnNumber, &fdsRead) returns 0. The value of iReturn should be printed in the debug output at line 133. What kind of object is the iConnNumber descriptor? Pipe? Fifo? Socket? /dev/windows? We really need a simple testcase without the X and emacs overhead... Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat
pgpGkKlWRA58C.pgp
Description: PGP signature