check EAGAIN & EINTR in read