Btw.: I'm not sure write(),writev() and pwrite() are allowed to do short
writes on regular files... ?
I believe it is the intent of the Standard to prohibit this (a
paragraph in the rationale says that short writes can only happen if
O_NONBLOCK is set, but this is clearly wrong because the normative
text says end-of-medium also results in a short write) but there does
not appear to be any language which requires atomic behavior for
descriptors other than pipes and FIFOs.
As a quality-of-implementation matter, for writes to regular files not
to be atomic would be considered surprising.