I already agreed in a parallel reply that IMHO ECONNRESET is not
an END-OF-FILE, but would like to quibble a bit about lesser points: ;-}
Pascal J. Bourguignon <p...@informatimago.com> wrote:
| It is not an END-OF-FILE, because END-OF-FILE occurs when you are
| reading, but ECONNRESET occurs when you are writing. It would be more
| like a OUT-OF-SPACE-IN-FILESYSTEM error, if there was one such.
AFAIK, ECONNRESET doesn't *only* occur when you are writing.
It should be equally possible while reading as well.
IME, the most frequent error while *writing* to the net is EPIPE,
which is *very* commonly seen by web servers when the client browser
closes the connection before the full response has been sent. [This
happens *very* often on slow or high-delay connections when users
hit "Stop" or click on another link before the first page finishes
Finally, OUT-OF-SPACE-IN-FILESYSTEM errors generally give ENOSPC
(Linux, BSDs, other Unixes) or, if due to administrative limits,
EFBIG (Linux/BSD/Unix) or EDQUOT(FreeBSD).
The semantics of ECONNRESET feel more like plain ol' EIO to me.
[By the way, note that FreeBSD distinguishes ENETRESET, ECONNABORTED,
and ECONNRESET, as well as several other errors than can happen
mid-connection, e.g., ENETDOWN, ENETUNREACH, EHOSTDOWN, EHOSTUNREACH,
 Which, on Unix/Linux systems, if not ignored/caught, causes SIGPIPE! ;-}
Thanks again to Dan Barlow, who once suggested simply *ignoring*
SIGPIPE in CL-based web servers, and instead catching STREAM-ERROR
on writes and silently ignoring it if caused by EPIPE [but logging
other STREAM-ERRORs, of course].
Rob Warnock <r...@rpw3.org>
627 26th Avenue <http://rpw3.org/>
San Mateo, CA 94403