On Sat, Jul 05, 2014 at 02:37:49PM -0400, Tim Hudson wrote: > On 5/07/2014 2:14 PM, Kurt Roeckx wrote: > > On Sat, Jul 05, 2014 at 12:45:37PM -0400, Tim Hudson wrote: > >> If you have SO_REUSEADDR set and a listener already in place you will > >> start a new listener > > No you won't. You will get a bind() error: > > socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3 > > setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 > > bind(3, {sa_family=AF_INET, sin_port=htons(3344), > > sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EADDRINUSE (Address already in use) > > > > Except on windows it seems. > > All the world is not (yet) Linux :-) ... and those semantics were > defined log ago - and evolved ... and there is also REUSEPORT (added > later) and a variety of interpretations - but the base REUSEADDR can > indeed behave that way depending on what platform you are on. Linux has > its own slightly different interpretation. Some google engineering > (search) will show the the variety of confusion that this causes in > cross-platform code.
Are you saying BSD has different behavior than Linux, other than Linux requiring that it's also set on the old socket? Kurt ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org