GNU bug report logs - #23615
25.1.50; Which platforms can safely use getsockopt(,,SO_ERROR,,)?

Previous Next

Package: emacs;

Reported by: Ken Brown <kbrown <at> cornell.edu>

Date: Wed, 25 May 2016 00:27:02 UTC

Severity: wishlist

Found in version 25.1.50

Done: Ken Brown <kbrown <at> cornell.edu>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 23615 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ken Brown <kbrown <at> cornell.edu>
Cc: 23615 <at> debbugs.gnu.org
Subject: Re: bug#23615: 25.1.50;
 Which platforms can safely use getsockopt(,,SO_ERROR,,)?
Date: Wed, 25 May 2016 19:24:45 +0300
> From: Ken Brown <kbrown <at> cornell.edu>
> Date: Tue, 24 May 2016 20:26:13 -0400
> 
> There are two places in process.c where getsockopt(,,SO_ERROR,,) is
> used to check the status of a socket connection attempt.  The first is
> at line 3289, where it is done on all platforms except MS Windows.  The
> second is at line 5500, where it is done only on GNU/Linux:

FYI, the first instance is ifdef'ed away for Windows because we can
never have EINTR on Windows, and the surrounding code that handles
that case is tricky to get to compile on Windows (since we override
the definitions of FD_* macros with our own).  MS-Windows does support
SO_ERROR.

> It would be better to use it on as many platforms as possible, since
> it's much more likely to give the real reason for a connection failure
> than the "error slippage" method.

Perhaps you or someone could write a small test program, and then
people here could run it various platforms and provide feedback.




This bug report was last modified 8 years and 351 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.