Unless you explicitly passed a length of zero to write
, this will never happen on a correct, POSIX conformant system. If you want to support all kinds of obscure broken legacy proprietary unices, you'll probably have to investigate what happens on each one, and whether the return value of zero is appearing in place of EINTR
or in place of EWOULDBLOCK
or some other error...
Personally in 2011 I would just assume it doesn't happen. There are a lot of other things which will break much worse trying to support such old broken junk..
Note, per POSIX:
If write() is interrupted by a signal before it writes any data, it shall return -1 with errno set to [EINTR].
http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html