retry if interrupted by a system call or if the filedescriptor is in nonblocking mode