[ovs-dev] [PATCH 06/14] socket-util: poll() for Windows.

Ben Pfaff blp at nicira.com
Fri Feb 21 20:34:17 UTC 2014


On Fri, Feb 21, 2014 at 11:38:19AM -0800, Gurucharan Shetty wrote:
> On Thu, Feb 20, 2014 at 5:14 PM, Ben Pfaff <blp at nicira.com> wrote:
> > On Wed, Feb 19, 2014 at 03:36:17PM -0800, Gurucharan Shetty wrote:
> >> Windows send() does not have a MSG_DONTWAIT.
> >> So, use the get_socket_error() function.
> >>
> >> Co-authored-by: Linda Sun <lsun at vmware.com>
> >> Signed-off-by: Linda Sun <lsun at vmware.com>
> >> Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
> >
> > The use of MSG_DONTWAIT here is just caution, since it only makes sense
> > to use check_connection_completion() on a nonblocking socket anyhow.  So
> > I would prefer to just change MSG_DONTWAIT to 0 here.
> Okay. Though I do not understand why we are ignoring POLLHUP for pfd.revents.

I think POLLHUP would indicate that the connection completed and was
then closed.  I think it's OK for the caller to deal with that, since
it has to deal with any other connection that closes anyway.



More information about the dev mailing list