This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author weeble
Recipients gpolo, kbk, taleinat, weeble
Date 2008-12-01.23:49:21
SpamBayes Score 1.474491e-09
Marked as misclassified No
Message-id <1228175362.91.0.195751822158.issue1529142@psf.upfronthosting.co.za>
In-reply-to
Content
Okay, I've uploaded a patch. As suggested, it passes 0 for the port 
number and the port is automatically assigned. It then extracts the port 
from the socket and passes it to the subprocess. Note that this means 
the subprocess inherits the listening socket, which I gather is less 
than ideal. However, as far as I can tell, this happens anyway if the 
subprocess is restarted, since the socket remains bound and listening 
the whole time. The patch also removes the use of SO_REUSEADDR because 
it is no longer needed.

This works without a problem for me on Windows XP, but I can't test it 
on anything more Unixy. I removed the three retries when it fails to 
bind a socket - it's not clear when this might fail and yet still be a 
good idea to retry, but I can put that back if that's something that 
shouldn't be messed with.
History
Date User Action Args
2008-12-01 23:49:23weeblesetrecipients: + weeble, kbk, taleinat, gpolo
2008-12-01 23:49:22weeblesetmessageid: <1228175362.91.0.195751822158.issue1529142@psf.upfronthosting.co.za>
2008-12-01 23:49:22weeblelinkissue1529142 messages
2008-12-01 23:49:21weeblecreate