[Python-Dev] noreply@sourceforge.net: [Python-bugs-list] [Bug
#111620] lots of use of send() without verifyi ng amount of data sent.
Greg Ewing
greg@cosc.canterbury.ac.nz
Mon, 14 Aug 2000 16:01:35 +1200 (NZST)
> ERRORS
>
> EINTR A signal occurred.
Different unices seem to have manpages which differ considerably
in these areas. The Solaris manpage says:
EINTR The operation was interrupted by delivery of a
signal before any data could be buffered to be
sent.
which suggests that you won't get EINTR if some data *has* been
sent before the signal arrives. It seems to me the only thing that
could possibly happen in this case is to return with fewer bytes
than requested, whether the socket is non-blocking or not.
So it seems that, in the presence of signals, neither write()
nor send() can be relied upon to either completely succeed
or completely fail.
Perhaps the reason this hasn't caused anyone a problem is that the
combination of blocking sockets and signals that you want to handle
and then carry on after are fairly rare.
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg@cosc.canterbury.ac.nz +--------------------------------------+