socket.socket.settimeout implementation
Lawrence D'Oliveiro
ldo at geek-central.gen.new_zealand
Fri Apr 7 17:00:17 EDT 2006
In article <1144228868.576227.186500 at i40g2000cwc.googlegroups.com>,
jnair at ensim.com wrote:
>Now my observation on FC4 ( kernel version 2.6.11-1.1369_FC4)
>"select()" can return before timeout with a
>"Interrupted system call" (EINTR) error,
Nothing Red-Hat-specific, or even Linux-specific, about this. It's a
standard *nix thing. _All_ potentially time-consuming system calls (such
as select(2), read(2), write(2)) can return EINTR, or some other
indication that they didn't do everything they were asked to do.
<http://en.wikipedia.org/wiki/PCLSRing>
>my question is , is it possible that our internal_select() fuction as
>seen on line 676 above returns "0" and we go on to do a "accept()" call
>which returns with a "Resource temporarily unavailable" error if the
>sockfd is not readable.
The semantics of select(2) is that you're supposed to check the
returrned bitmasks and only take the appropriate actions if the
corresponding read-ready, write-ready and error bits are set.
See the select(2) man page for more on this.
More information about the Python-list
mailing list