|
From: Nicholas N. <n.n...@gm...> - 2009-04-29 01:45:05
|
On Wed, Apr 29, 2009 at 3:33 AM, Michael Smith <ms...@xi...> wrote: > On Tue, Apr 28, 2009 at 10:28 AM, Michael Sweet <ms...@ap...> wrote: >> I don't think you can reuse a socket after a failed connect()... > > That is indeed the problem here. Which is... not mentioned in the > documentation - the manpage (this from linux, but the osx one has > similar wording) says "connection-based protocol sockets may > successfully connect() only once" - but this didn't connect > _successfully_. However, changing the test program to close the socket > and create a new one makes it work. Arguably a bug in darwin, but easy > enough to work around. Yes, it was this wording in the man page that fooled me. I've committed a patch similar to the one Filipe posted -- main difference is that I don't treat ECONNREFUSED specially, I just close and re-open the socket if connect() fails for any reason -- and the test is passing now. Thanks to everyone for their suggestions! On Darwin, I now get only 16 test failures in memcheck/ and 6 in none/, which is excellent. (Helgrind, DRD and exp-Ptrcheck still cause lots of failures, though, as they are all completely broken.) Nick |