Ian Lance Taylor <ian@airs.com> writes:
> Probably true, but on Unix you certainly can't assume that write will
> set errno if it does not return -1.
Right. The code you propose is isomorphic to what I suggested
originally. The question is which error condition should we assume
if errno has not been set; is disk-full sufficiently likely to be the
cause that we should just say that, or are there plausible alternatives?
regards, tom lane