Handle EINTR by repeating the call.