GNU bug report logs -
#23615
25.1.50; Which platforms can safely use getsockopt(,,SO_ERROR,,)?
Previous Next
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 #14 received at 23615 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> Cc: 23615 <at> debbugs.gnu.org
> From: Ken Brown <kbrown <at> cornell.edu>
> Date: Wed, 25 May 2016 15:21:56 -0400
>
> On 5/25/2016 12:24 PM, Eli Zaretskii wrote:
> > Perhaps you or someone could write a small test program, and then
> > people here could run it various platforms and provide feedback.
>
> Test program attached. It simulates the situation of bug 23606 (before
> the bug was fixed). Here's what happens on Cygwin:
>
> $ gcc -o socket_test socket_test.c
>
> $ ./socket_test.exe
> Server listening on port 50176.
> Attempting client connection...failure: Connection refused.
With MinGW, I get this instead:
D:\usr\eli\data>socket_test
Server listening on port 2213.
Attempting client connection...success.
Do we have to have a failure in this case? Or is the above a valid
outcome?
Of course, I needed to hack the code quite a lot to get it compile on
MS-Windows; the result is attached below. Maybe I broke the code
while doing that?
(I don't think calling 'connect' after 'listen' is supposed to work;
on Windows it predictably fails with EINVAL, as documented on MSDN.)
[socket_test.c (application/octet-stream, attachment)]
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.