Added check/repeat for open()/read() when receiving EINTR.