some write() implementations can still return 0 and set errno to EINTR or EAGAIN

in case of non-blocking i/o (even if the spec says it should return -1)