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

Re: possible issue with bsd_poll() on Windows


On Wednesday, December 19, 2018 7:13:51 PM CET John Dunn wrote:
> On Monday, December 10, 2018 2:26 AM Andreas Schneider wrote:
>  > Please check
> > 
> > https://git.libssh.org/users/asn/libssh.git/log/?h=master-poll
> 
> Same behavior, as far as I can tell. In the case of a connection refused
> exceptfds is set and events is 0x310 (  POLLWRNORM | POLLRDNORM |
> POLLRDBAND ). That means revents is not zero so rc is incremented to 1 and
> returned.
> 
> You might not be aware but Microsoft has a freely available Windows image
> with Visual Studio available here -
> https://developer.microsoft.com/en-us/windows/downloads/virtual-machines.
> You should be able to use to easily reproduce the issue on your local
> machine in a VM.

I have Visual Studio but I'm not a Windows developer :-)


Ok, the issue is that for exceptfds there is no error checking. The bit 
questions is if getsockopt() for SO_ERROR will reset the error, I don't want 
to reset it in that function as we check the error in the pollcallback ...


	Andreas

-- 
Andreas Schneider                 asn@xxxxxxxxxxxxxx
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D



References:
Re: possible issue with bsd_poll() on WindowsAndreas Schneider <asn@xxxxxxxxxxxxxx>
RE: possible issue with bsd_poll() on WindowsJohn Dunn <John.Dunn@xxxxxxx>
Archive administrator: postmaster@lists.cynapses.org