[Python-Dev] socket.SOL_REUSEADDR: different semantics between Windows vs Unix (or why test_asynchat is sometimes dying on Windows)

Raghuram Devarakonda draghuram at gmail.com
Mon Apr 7 15:52:42 CEST 2008

On Sat, Apr 5, 2008 at 1:22 PM, Trent Nelson <tnelson at onresolve.com> wrote:

>  Nod, if SO_EXCLUSIVEADDRUSE is used instead in the code I posted, Windows raises EADDRINUSE on the second bind().  I don't have access to any Linux boxes at the moment, so I can't test what sort of error is raised with the example I posted if listen() and accept() are called on the two sockets bound to identical addresses.  Can anyone else shed some light on this?  I'd be interested in knowing if the process wedges on Linux as badly as it does on Windows (to the point where it's not respecting ctrl-c or sigkill).

When I call sock1.listen(5) after sock1.bind(), the test passes for me
on SuSE Linux 10.1


More information about the Python-Dev mailing list