> Cc: [email protected]
> From: Gisle Vanem <[email protected]>
> Date: Wed, 16 Dec 2015 14:11:27 +0100
> 
> Eli Zaretskii wrote:
> 
> > +      {
> > +#ifdef WIN32
> > +   /* If the connection timed out, fd_close will hang in Gnulib's
> > +      close_fd_maybe_socket, inside the call to WSAEnumNetworkEvents.  */
> > +   if (errno != ETIMEDOUT)
> > +#endif
> > +     fd_close (sock);
> > +      }
> >      if (print)
> >        logprintf (LOG_NOTQUIET, _("failed: %s.\n"), strerror (errno));
> >      errno = save_errno;
> 
> I assume fd_close() could cause 'errno' to be set again (for some
> strange reason?). So shouldn't 'save_errno' be printed instead?

You mean, when errno is ETIMEDOUT, or when it isn't?  If the former,
fd_close is not called (on MS-Windows), so both values are identical.
If the latter, then I think the code does want to print the value of
errno from fd_close.  So I don't see why a change would be needed; am
I missing something?

Reply via email to