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 exarkun
Recipients Daniel.Evers, exarkun, neologix, tarek
Date 2010-04-22.13:12:41
SpamBayes Score 1.47091e-10
Marked as misclassified No
Message-id <1271941967.66.0.351386653677.issue8498@psf.upfronthosting.co.za>
In-reply-to
Content
> Furthermore, python's socket documentation makes it clear:

Why does CPython go out of its way to make it impossible to pass 0 to the platform listen() API?  The part of the specification you quoted makes it very clear that 0 is a valid value for this argument.  And 0 seems to have a very different meaning than 1, but for some reason CPython thinks that 1 is a better thing for 0 to mean.

Perhaps there is a real reason someone thought to add this check in sock_listen, but if not, I think it's worth considering removing this check.

Unfortunately the commit message for the revision which added this check (r3880) is not informative:

sock_listen: ensure backlog argument is at least1

> If you really want to only accept 1 connection (I'm talking of sending back a SYN-ACK, not an accept() call), you can just close the server socket

This makes perfect sense, though, and is good advice in general.
History
Date User Action Args
2010-04-22 13:12:48exarkunsetrecipients: + exarkun, tarek, neologix, Daniel.Evers
2010-04-22 13:12:47exarkunsetmessageid: <1271941967.66.0.351386653677.issue8498@psf.upfronthosting.co.za>
2010-04-22 13:12:44exarkunlinkissue8498 messages
2010-04-22 13:12:42exarkuncreate