bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] poll: fix regression in Win32 emulation of poll function


From: Daniel P. Berrange
Subject: Re: [PATCH] poll: fix regression in Win32 emulation of poll function
Date: Thu, 11 May 2017 15:37:56 +0100
User-agent: Mutt/1.8.0 (2017-02-23)

On Thu, May 11, 2017 at 04:36:46PM +0200, Bruno Haible wrote:
> Daniel P. Berrange wrote:
> > Perhaps I'm mis-understanding, but I was looking at this code:
> > 
> >       h = (HANDLE) _get_osfhandle (pfd[i].fd);
> >       assure (h != NULL);
> >       if (IsSocketHandle (h))
> >         {
> >           int requested = FD_CLOSE;
> > 
> >           /* see above; socket handles are mapped onto select.  */
> >           if (sought & (POLLIN | POLLRDNORM))
> >             {
> >               requested |= FD_READ | FD_ACCEPT;
> >               FD_SET ((SOCKET) h, &rfds);
> >             }
> >           if (sought & (POLLOUT | POLLWRNORM | POLLWRBAND))
> >             {
> >               requested |= FD_WRITE | FD_CONNECT;
> >               FD_SET ((SOCKET) h, &wfds);
> >             }
> >           if (sought & (POLLPRI | POLLRDBAND))
> >             {
> >               requested |= FD_OOB;
> >               FD_SET ((SOCKET) h, &xfds);
> >             }
> > 
> > which takes the 'FD' and gets the associated SOCKET / HANDLE.
> > The 'xfds' fd_set is thus populated with a SOCKET, not a FD.
> 
> You're perfectly right. I misread the code. I'm applying this:

Great, thank you for confirming :-)


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]