Handle EINTR (thanks Gregory)