Added EINTR support.