Message121979
>> This implementation assumes that the OS sets any socket it receives
>> via accept to nonblocking. (this is a false assumption on BSD)
>
> Not true. It doesn't assume that (it doesn't assume the reverse,
> either).
The Python implementation sets timeout=None (which implies that the
underlying socket is blocking).
>> The end result is that the OS has a nonblocking socket and the Python
>> object thinks it is blocking. This is why the socket object in
>> Python has timeout=None yet calling fcntl shows the socket is
>> nonblocking.
>
> That conclusion is flawed. Python has not associated a timeout with
> the socket. It makes no claims as to whether the socket is blocking
> or not. So you have created a non-blocking socket without timeout.
The problem is that it has. It has created a new Python socket
object with a specific value for timeout (None), but the underlying
socket is nonblocking.
The docs state that timeout = None makes the socket blocking. |
|
Date |
User |
Action |
Args |
2010-11-21 20:26:56 | Justin.Cappos | set | recipients:
+ Justin.Cappos, loewis, ronaldoussoren, exarkun, roysmith, pitrou, giampaolo.rodola, ned.deily, nicdumz, bbangert |
2010-11-21 20:26:56 | Justin.Cappos | set | messageid: <1290371216.68.0.900140278132.issue7995@psf.upfronthosting.co.za> |
2010-11-21 20:26:55 | Justin.Cappos | link | issue7995 messages |
2010-11-21 20:26:55 | Justin.Cappos | create | |
|